If someone dies who is a tenant and if the estate wants to terminate the lease, all they have to do is notice the landlord by registered or certified mail, return receipt requested.
That is the new law, Real Property Law 236-a.
Don't worry landlords, this law doesn't relieve tenants for past due rent, damage, or expenses.
While this law doesn't apply to cooperative units, it sure seems to apply to commercial property, which is insane (all the more reason to have tenants lease as entities, not individuals).
This law is effective February 15, 2024.