Now imagine the government having the power to do that on every vacant property. Not just state-owned: all private-owned but vacant properties could be forcefully rented.
There's more chance for corruption, but at some point each connected person needs to rent 4 apartments to fill all the space, which they won't, so it'd likely still be a net-positive effect.
And unlike normal nationalization campaigns, it's easy to keep the government from making itself the owner's administrator: just rent out your rental properties. I understand that it's nicer to let them sit empty and wait for prices to double and not deal with renters because rents are a joke compared to price increases, but that's not going to work out.
I could live with a different alternative: the government declaring the buildings condemned and rezoning them as non-construction ground. That'll quickly motivate investors to actually put the houses to use.