Films are shot in all sorts of risky locations or their replicas: roads, factories, battlefields, race circuits, intergalactic space battles where dangerous extraterrestrials shoot people with lasers. If films are no longer including scenes with railways, it's probably because writers are no longer writing such scenes.
The
BBC» wanted to use Waterloo for the opening scene of "Bodyguard" however, having talked with Network Rail, the
TOC▸ etc it was decided it wasn't feasible to close part of Waterloo for filming or to take a train out of service to do so, which is why a Heritage train was used instead.