In the USA, exploring abandoned buildings often comes with a risk of being arrested for trespassing.
Depends on the cop you meet! I’ve met plenty of really kind, courteous cops whilst urbexing. They see I don’t have a gun, spray paint, or anything that may cause harm to someone else or the property. Typically they either a) let me stay or b) escort me out of the building. I’ve also had a fair share of really rude and arrogant police officers who threatened to arrest me and send me to prison. Only experienced this once, but I remained calm, talked in a level, even voice that I’m just here to document the decay, and that I am weaponless.
I usually visit more secluded places that are little known and less vandalized. Usually the “hotspots” are where gang, gun, and other violences take place, and the cops are on the scene in a matter of minutes. Most places I go to are either a) so far in decay or b) are so “off the grid” and irrelevant; meaning no suspicious activity, so the cops stay away. I always go with my buddies though; an N95 mask, respirator, gloves, flashlight with extra battery that has a pop-out knife in case; it’s secluded though and looking at it it just looks like a flashlight.
Just my .02.