It is, after all, a purely pecuniary concern on the part of the landlords.
More generally speaking, real estate market failure is very much a problem that local policy can solve. Global investors are looking for safe havens for their wealth. As much of the attractiveness has to come from the local legal environs, which can be more or less friendly to those types of investors.
It just takes the political will, which admittedly, can be quite thin.
I'm not sure if such a policy would help, it could act as something tantamount to rent control - but its not hard to make a policy in such a way that it wouldnt have a negative feedback loop.
At some price someone will decide that the building is a worth while risk. You might not like that price, but there will be a price you like more than getting hit with high taxes for owning an empty building. The point here though is not to keep you, the landlord, rich; it's to make a city full of shops with happy customers, taxable sales, etc. If you can't make your building work for you then your business has failed and you need to move aside to let someone else use that real estate asset. That's how capitalism works.
The whole reason we even have cycles of growth and contraction is because feedback loops are too slow so we always react too slowly, and when we do we over correct. But that might be an unsolvable problem and just a fact of nature.