Friends were ticketed by a DNR CO for railroad trespass while hunting in Brighton Rec Area between Chilson Road and Bishop Lake Road a few years ago. CO said that he probably wouldn't have written tickets if they had just crossed the track to move from one parcel of Brighton Rec Area land to another on the other side of the track. The State land is low there and the tracks run on a tall gravel embankment in this area. Since they were sitting on the gravel embankment or on one of the rails, which was observed by the CO, he wrote tickets for the adults.
They hired lawyers and the lawyers went to a pre-trial hearing in Howell and negotiated the railroad trespass charges down to a civil offense with a substantial multi-hundred dollar fine per person. Cost a bunch of money for lawyers, fines, and court costs, and way too much time and worry.
They asked the CO how wide the railroad property or easement was in that area. The CO said that he didn't know but he was sure that it included the embankment.
It probably is railroad trespass if you cross a track somewhere other than a roadway or a designted crosswalk, but a DNR CO or a local LEO has some discretion. They can choose to warn or choose to ticket.
Be careful. Be discrete.