It's not a regulatory issue. The issue is loan covenants negotiated between private lenders and borrowers. No one forced them to agree to those terms, and they are free to renegotiate at any time.
But cities that want to retain vibrant downtowns should consider imposing some sort of vacancy tax on commercial real estate. That would give landlords an incentive to lease their space out at a lower rate rather than waiting for a more lucrative tenant to come along.