i don't think there's too many people (or at least, people making these decisions) who think foreign ownership is the real problem here. it's just the portion of the problem that's politically easiest to tackle.
banning foreign ownership will help, even if only a little bit.
However many foreigners will be punished as a result, even if their participation in the housing market was going to be in good faith and aligned with the public interest.
If the actual problem is vacant units, then punish vacancy.
Failing to do that is admitting that xenophobia is easier than good policy.
banning foreign ownership will help, even if only a little bit.