There are also no tenant protections for criminal intruders, squatter protections require a claim of right like a disputed lease or a holdover tenancy, or continuous possession over many years. Someone that just walks into a residence is an active trespasser and can be arrested for criminal trespass or burglary.
Here is New York: https://www.nysenate.gov/legislation/laws/PEN/140.20
I don't know exactly what legal technicalities are involved, but this did actually happen to me in a de facto sense!