Who ultimately owns the properties does not really enter into the price equation.
I know the stories of how foreigners are so greedy that they buy houses but decide to forego the income from renting them out. Those anecdotes don't pass my smell test. Greedy people like to have income!
Housing has a value as an investment, and leaving the housing unoccupied reduces the cost to maintain the investment. Tenants have a lot of protections in many jurisdictions, and an owner is responsible for maintenance, depreciation and damages, while a tenant cannot be evicted by the landlord who wants to sell a unit without a substantial waiting period, if at all.
https://bostonagentmagazine.com/2018/09/11/study-bostons-new...
https://nypost.com/2021/08/05/nearly-half-of-luxury-units-em...
https://www.nytimes.com/2017/07/21/upshot/when-the-empty-apa...