Some obstacles are the basic requirements of housing (kitchen, bathroom, windows) don't really match office space. You need lots of water/waste/electric/hvac pipes distributed across a space for residential, not the same for commercial where they can be more centralized in the floor. The space distribution is also not the same - eg. "deep" buildings are worse for residential because the ideal window frontage to room depth ratios don't match - you can have a desk or communal space very far from the window in commercial real estate and its usable, but you can't really put residential rooms far from a window because no one wants a windowless room and laws usually prevent it.
Additionally, I've seen office windows that don't open but you usually need (by law) to allow opening windows for residential use (for ventilation purposes I think). This can be a VERY expensive fix. Most people also want windows that open too.
On the other hand, the way these are often overcome is with huge "loft-style" apartments - very high ceiling and large spaces. The bigger window height helps with the depth issues. The big spaces are then catered to rich people, who fund the massive Reno bills. (note: historically, lofts existed because artists could bypass zoning laws to live in warehouses they used as a studio, then it became trendy)