King Canute should just decree that the tide is to go out.~
No matter how you structure the law, the capacity of property speculators to evade its intent will likely exceed the government's ability to enforce it, especially when some of those speculators are government officials.
I foresee that a vacancy tax would be avoided by building apartment buildings that are only 80% finished, or whatever the law threshold may be, such that they do not qualify as vacant housing units, but can still be brought onto the housing market more quickly than erecting a new building from the foundations.