This is a supply/demand problem. Your solution is to restrict the supply of short term rentals. Restrictions rarely work, the hypothetical situation you mention would benefit from allowing more building of long term rentals.
And anyway as long as there is no restrictions on the day-rental, investor will choose the option in their economical self-interest. Restriction must apply to force long term rentals.