RR track right of ways are controlled by the RR, and understandably they don't want anyone other than their people on their land for liability reasons.
It was never legal to hunt RR tracks, at least in Minn where I grew up and here in ND, it was just that nobody cared in the 60s & 70s, and even not so much in the 80s. Back in the day, RR track right of way were the answer to a hunting prayer for kids whose only modes of transportation were foot or bike.
I moved to ND in the early 80s and never had an issue walking into private land on the tracks or hunting along the RR bed. By the 90s the RR was paying more attention to this issue. Where before if a work crew passed on the tracks they would just wave, by about 1997 or so they would actually stop and tell a guy to vamoose.
My response was to walk in on the tracks as quickly as I could, then make sure I was unquestionably on the adjacent private land where I had blanket permission to hunt or walk if a service truck approached. Not much anybody could do about that as it was obviously possible to get where I was going by walking on the private land, albeit much more work...