If you don't want to live someplace that allows short term rentals, make sure it's in the contract that you sign when you buy the place. No regulation required.
You already did, unlicensed hotels aren't legal to run out of your home. This law just makes that easier to enforce.
That isn't a contract its a law. A law that I'm arguing against in favor of contracts.
Contracts like you suggest are common and working today in other cities. When I bought a condo in central London, my contract with the association of all other owners in the building specifically forbade short-term sublets, and forbade any sublets without the written approval of the association. When one condo owner started renting out on weekends through web advertising, the association had its lawyer bring that clause to the owner's attention and the practice was stopped immediately. No law needed. (BTW, these contracts for UK condo property take the form of "leases" for hundreds of years, which can be sold like other property.)