Not necessarily - for example in China foreigners are limited to owning one house. That limits speculation but does not provide hindrance for someone honestly trying to live.
In general, of course not, but GP originally proposed specifically forbidding non-permanent residents from buying houses. How is that not hurting immigrants?