I wonder if they get too heavy for the bridges?
There's standard axle-weight limits.
And there's restricted lines and bridges, with lower limits. These could be due to the bridge design or its state of repair, or it could be the weight of the rail. Railcar weights were a lot less, a century ago, and 132-lb (per-foot) rail only came out with larger hopper cars, carrying coal, grain and ore.
A lot of branch lines have lighter 98-pound or 75-pound rail, jointed, not welded...and modern locomotives cannot travel on them. A Canadian company has been making money for decades, rebuilding 50-year-old locomotives - GP-35s or 38s, MP1500s...the smaller ones with two-axle trucks. EMD came out with a GP-15 in the mid-1970s, for just that purpose, but that was at a time when railroads were regulation-choked and many, bankrupt.
On mainlines, if the battery block replaced the prime mover, it might only be a little heavier. But yes, weight would be the limiting factor.
Also limiting, would be "availability." If a battery CAR takes two hours to quick-charge, how much longer would a battery locomotive, with 20x the potential power?
ALSO...we KNOW these batteries have to be kept clean, cooled, dry. Railroads are sloppy on maintenance. You see those Eww Tube vids about "locomotives on fire"? Most of those are fires in the exhaust stacks - those huge engines have exhaust channels like HVAC ducts. A blown injector or turbocharger will result in unburned oil pumped out and dumped into the exhaust....during idle or light use, it just smokes. But take it on a grade at Notch 8, and the temperature rises, and the coked oil goes alight.
That's just one issue. There's legal requirements on lights, safety appliances like handrails, and lighted number boards; but nobody cares if the cab, or the engine bay, leaks water in. They're just not equipped, with personnel or knowledge or time, to fix those things.
So a battery vault starts leaking water in a stormy period, and next you know, the head end of a moving train is a nuclear bomb.