I’m paying far less on my mortgage than I would on rent in my nice neighborhood, based partly on luck, partly on finding a good opportunity, and partly on locking in my housing costs while the rent around me steadily increases.
Aggregate analyses aside, I have a hard time believing that a mortgage will generally be worse as an investment than renting in an era where algorithms are deployed to push rents as high as possible, as often as possible.