Obviously you’ve never been a landlord. In NY the tenants/squatters have all the rights, eviction moratoriums, etc. You’d need to hire armed guards 24/7 to keep squatters from entering as do some Los Angeles county landlords do.
Then they shouldn’t do it. Really the math is simple:
If you buy the property you have to follow the rules and take care of the situations
If you can’t afford to
Or don’t want to
Everything that happens then is on you.
I got no sympathy for anybody that lets their building go derelict. I don’t care about the laws. Because the fact that MOST people manage to not their buildings go derelict in the same area shows the problem isn’t the laws, it’s the owners. They didn’t take care of their stuff and now they’re whining.