Notably though, it’s usually civil law. So someone would have to have standing to sue (typically family). And typically more
of an attractive nuisance type deal.
So it’s of the sort of thing where if someone is in your house, and falls off something and hurts themselves because of something negligent you did or whatever, then yeah they can sue for damages. Regardless of if they had your permission to be there, because you had a duty to not leave something obviously dangerous just lying there.
But it does lead to a lot of weird/unjust situations - either if the law does exist, or if it doesn’t.