You would only pay tax on the unimproved value of land. You pay no tax on everything built on it. So an empty 1-acre lot next to an apartment building providing 100 homes on a 1-acre lot would both pay the same taxes.
So landlords would earn a profit but they wouldn't earn rent (in the neoclassical sense).
Its almost like anybody who wants exclusive access to land (for their housing or their business) has to pay society for the right to use it. And if a business (like an apartment) tried to pass on costs to customer (their renters) without providing more or better services, they are essentially just admitting their land got more valuable, so they would just pay more in land value tax (thereby providing more funding for UBI or public services)
There is a solution for landlords that we've known about for a long time.
And its doesn't involve the a massive, powerful state controlling where people can live.
Its a 100% tax on the value of land. It would stop the landowning class from unfairly stealing huge amounts of money from the poor in the form of rent. It could fund the government (allowing us to decrease taxes that hurt labor, like an income tax), or be redistributed as UBI.
Seriously, if you are at all interested in potential solutions to the housing crises and wealth inequality, please, please, google Land Value Tax and Georgism.