I've seen people wreck super hard trying to cross the streetcar rails at too shallow an angle in pdx multiple times. But that's an optional behavior. Just the other day I saw a moose crossing the road over in Twin Mountain, and I chose to slow down and not hit it. If I'd made another choice that resulted in a collision, and I'd survived, I wouldn't expect to get some settlement from the town of Twin Mountain, NH. Similarly if you ride your bike into a train track that one's pretty much on you lol.. being aware of one's surroundings is one of those basic life skills.
Installing a huge hazard in the road is optional too, though. If [insert city here] had saved money and used a bus instead of a street car, all of the problems that come from having a rail in the road would have been avoided.
For heavy rail, they don't often run in the road, parallel with the road, in the lane of travel. And when they do, it's usually in an industrial area that people aren't walking and cycling through.