Some people can't afford the transaction costs associated with buying and selling real estate every year or few. Clamping down on rentals hurts the economically weak.
Your xenophobia is showing, blaming "foreigners". Absentee landowners with vacant properties are a problem. Landlords are a valuable service provider in an economy.