Many have been converted before, even in the recent past, Google it.
https://www.washingtonian.com/2022/11/14/dc-area-leads-the-w...
And plumbing and wiring a building is vastly cheaper than building a new one from scratch.
Most modern office buildings are already designed so their tenants can orient the space however they like, Including adding/removing walls and plumbing/electric
If you can buy office buildings at half the valuation of a similar square footage residential building, converting it will obviously be profitable. It was already profitable in many cases pre Covid before office became severely depressed. The valuation gap between residential and office has probably never been wider