Many actually have big radiators to dissipate energy regenerated while going downhill by their electric traction motors.
Hopefully, as batteries get less expensive this changes.
https://www.popularmechanics.com/science/energy/a39372219/se...
Here is one (I hope) that isn't paywalled: https://reneweconomy.com.au/fortescue-starts-work-on-world-f... Failing that try googling "infinity train battery". It was a popular story at the time. As the story says, at least two companies are doing it in Australia.
The amount of destruction these things can cause when they lose control of all that energy is impressive: https://www.atsb.gov.au/publications/investigation_reports/2... and https://www.atsb.gov.au/publications/investigation_reports/2... They can not be stopped in a controlled fashion once they get going. The latter one cost BHP $800M from memory.