Landlords are making money or else they would not be renting apartments. There are actual and opportunity costs across the board and the timing of returns is a big factor on whether or not the rental option is better than ownership for your net worth. But the choice of owning a home usually goes beyond the numbers for most people. It is technically lifestyle inflation if you are moving from a rental apartment to owning a single family home. That is fine if it is in alignment with your life goals and not inherently a bad thing.
If the location of your home is a big function of the "success" of your retirement, you are likely much better off buying if the numbers work for your FIRE budget. Real estate and rental prices will roughly track inflation nationally, but local markets can have vastly different characteristics. I don't think you can really guess where the hot markets will be over a 50 year retirement, but when you choose to rent you might find yourself priced out of the market eventually.
I rent because I am not attached to the area I live, and I don't want to be. I've been here 15 years. Math has never factored in the decision. It ended working out really well because the market here is somewhat unusual with a growing demand for single family homes and low demand for apartment rentals. I mostly consider that a coincidence.
I think most people do not fully realize the cost of home ownership and should consider more math in their decision to buy a specific house. But if you use a mathematical argument that spending money on anything is bad for your net worth, there's really no end to that argument. A house might have a few more zeros than a typical purchase, but a savvy owner ends up in a place that improves their quality of life, which is pretty much the whole point.
As a renter, I find the typical bad arguments for ownership irritating. I don't like being told that I'm throwing my money away when I know it is not true. But I also don't try to educate people with comparably weak arguments and claim I'm better because I used math in the process.