For a while, usually yes. Long term, no chance.
A mortgage can only ever go down. Rents most of the time only go up.
My mortgage was initially over 3K while rent had been ~1.5K. But years later, those equivalent rents are ~5K and my mortgage is under $1K. In a couple decades when I'm retired, who know how high those rents will be? But I know exactly what my mortgage will be, $0.
So just the rent vs mortgage comparison (or rent vs no rent) is misleading at best, downright fraudulent at worst.
The thing is, a landlord isn't likely to continue renting out if they're losing money. Typically, the money for services, maintenance, etc. comes from rent.
The renter is indirectly paying for those, otherwise the landlord would be out of business.
Approximately never are any of those costs taken care of by the landlord! The renter is paying for them, plus a profit margin for the landlord. That's what rent is. The landlord isn't running a charity.
Only exception is if you luck into a rental by someone who paid off the property long ago and doesn't care to charge market prices for it.
With real estate "location location location". In some areas there are situations that will make one or the other better. Everybody has their own life goals, and that in turn will feed into what is better for you.