Nice question!
Magic and Physics
Here on earth we have this thing called physics that, among other things, explains why things fall down. There in our imagination we have magic that can do pretty much whatever we want; that's why its magic. However, in order to play D&D we start from the assumption that physics works over there in our imagination and that magic "breaks the rules" in some well defined way.
Let's just consider Newtonian mechanics (relativistic methods are not needed as we are not dealing with relativistic speeds).
The Rules
... the rod doesn't move, even if it is defying gravity. The rod can hold up to 8,000 pounds of weight. More weight causes the rod to deactivate and fall. A creature can use an action to make a DC 30 Strength check, moving the fixed rod up to 10 feet on a success.
"the rod doesn't move" doesn't mean anything unless you decide what it doesn't move relative to. Aside from the obligatory "That's up to the DM" lets try and think it through by considering our expectations in other situations.
I will assume that your campaign takes place on a rotating planet orbiting a sun similar to earth; it doesn't have to but that is the default expectation.
- You activate the rod while standing on the equator. Do you expect the rod to move west at a speed of 1,670 km/h? Probably not.
- Same situation but now you running north as fast as you can. Do you expect the rod to stop relative to you or the ground? Probably the ground.
So our expectation is the rod takes its idea of "doesn't move" relative to the planet (or plane) it is sitting on.
Applying that to the train, the rod stops and the train keeps moving. If the train weighs more than 8,000 lb then the rod immediately deactivates.
Perhaps a better idea is to get in front of a bandit and activate the rod at neck height?