It seems to be more lackadaisical in the US, at least where rail isn't the major player it once was. Santa Cruz has rails running north/south that go directly through the city (and several adjoining cities as well), with not only open crossings but pretty much open access anywhere along the line. However, the only train that runs on those rails these days is a tourist excursion train that runs between a private RR here in Felton and the Boardwalk down in Santa Cruz. There's no freight, no passenger service any more (although people keep talking about it and spending money on studies that don't seem to produce any action one way or another).Most UK railways are fenced off and it would be trespass to go near the line. There are exceptions of course, there are still some open crossing where say an ancient footpath crosses the line and it has to be open to cross. These are usually well known suicide spots so even these are being closed off. In the UK the land either side of the line is owned by what we call Network Rail, there is not much open land around railways, well maybe some in the north of Scotland.
The cables for the lineside equipment are also rich pickings for criminal gangs who can strip the metal out for scrap.
I expect that BART (Bay Area Rapid Transit) in the San Francisco/Oakland area, which is a well-traveled intercity commuter train, must take greater care.