I agree this is closer to the root of the problem. It's not just foreign capital, or faceless corporate ownership (although both are part of it).
IMO it's that every professional / business / owner / wealthy person in Canada can basically easily borrow against their existing home equity, use that to purchase add'l rental units, and claim the mortgage interest as an expense against the rental income (thereby making the loan "free" of cost, although obviously you're still on for the principle). You have the risk of the housing market crashing, but that hasn't seemed realistic for the past 10+ years or so.
I'm not sure what the solution would be. I hesitate to even call it a "loophole" since to me, from a business POV, it makes sense (the cost of the debt is an expense to be put against the income, so you shouldn't have to pay tax on it).
Then, even if you're just breaking even as a landlord after the interest, property tax, maintenance, vacant times, etc - the underlying asset is appreciating as well.
So there needs to be solutions (like graduated tax on subsequent properties, or perhaps changes to being able to claim your mortgage interest as deductible, etc) to change this underlying dynamic.
Yes, dramatically increasing the supply of housing would be a better fix, but that's not likely to change quickly while economically de-incentivizing the real estate investment I described above would change things.
My $0.02, not an expert.