The free market has a solution. Banks as primary lenders get first bite of the apple. The landlords will probably get screwed, but then their properties become prime opportunity for somebody to buy them at auction prices.
Actually, both parties will get screwed if there is next to no money. Further, the landlord might be in a better position as leases give them a right to possess the equipment on the premises in case of default. And it is their premises.
You have three parties involved. The banks, the landlords, and the tenants.
The tenants get completely screwed, they'll lose everything unless the government bails them out, and it looks like the government is going to skip out on doing that.
Landlords similarly get screwed, they still have to pay taxes and utilities and unless they have a pile of cash to keep themselves afloat, they'll end up going bankrupt. They can inherit the mechanics of the businesses when the tenants go bankrupt, which would just get passed on to the banks.
This is where the banks come in. Banks as primary secured lenders get first bite of everything. They'll inherit ready to go businesses they'll sell for the balance on the mortgage.