Yes, what is the target problem really?
Do you want to ban vacant or mostly vacant housing stock for its constriction of housing supplies? Why only foreign owned? Don't vacant holiday or investment homes of residents have the same impact?
Do you also want to ban renter occupied homes where a landlord is profiting excessively? How do you define excessive? Why only foreign landlords? Don't domestic landlords have the same impact? Don't investment trusts have the same impact, regardless of who owns the shares? Or is there a problem with your tax system, so the foreign-consumed profits are not taxed at the source?
If you dislike speculative investment, shouldn't you really dislike renter occupied homes where the landlord isn't profiting? They might accept a tenant at a partial loss, as long as it costs less than holding the property vacant, but this behavior depends on their speculative expectation that the future value is worth the holding costs. It is not sustainable for rent to be lower than the total holding costs (taxes, maintenance, depreciation, risk).
It is interesting to imagine a strict owner-occupation requirement. Nobody can own a home they don't live in as primary residence. Obviously, that means nobody can own a second home unless you zone some special vacation-home areas. And nobody can become a landlord, owning and operating rental properties. No person and no corporation nor trust. Ignoring the obvious disaster of how to get there from here, how would such an economy work? Does everybody at every income level get access to financing to buy their own home? It's hard to define a similar rule for commercial properties, since corporations can fractionally live in many places and it will be hard to define a minimum occupation density to distinguish real use of a commercial property from token use of a speculative holding. The same problem applies to wealthy home owners---what's the difference between a huge estate/mansion and an apartment building other than resident density?
At the other extreme, what about a strict public-owner requirement? What if every property had to be owned by a trust available on open markets? Everyone could buy into shares of every trust, and everyone would pay rent to some trust owning their residence. Everyone could benefit from real estate investment whether they have enough assets to own 1/100, 1, or 100 homes. Independently, they would decide what kind of housing and cost are best for them. What would happen to rents and property values...?