20 kg of hydrogen is about 2400 Mj. The Class 319 has 1 MW of motors. So the hydrogen fuel will run the train for 40 minutes at max power. Maybe 3 or 4 hours in typical use?
20 kg may not seem like a lot, but hydrogen has three times the energy content of diesel.
Keep in mind that trains expend a lot of their output power only during takeoff. Maintaining a constant velocity requires relatively little power, and with regenerative braking some energy may be recovered (the primary reason for the Li-Ion cells between the power source and the motor).
I don't have any numbers on this, high-power electronics was never my field. But I wouldn't at all be surprised if cruising power was less than 10% of max engine power.
It sounds as if the train has a battery pack as well, so it will recover breaking energy. Trains are uniquely suitable to energy recovery since they have mostly predictable acceleration and deceleration curves.
Not unusual for trains to be at 50-75% throttle even at cruise. No getting around v^2
A lot of this is just due them being relatively underpowered since acceleration isn't usually a priority. For instance the BR Class 319 mentioned up thread has 1300hp to move over 120 tons - and the aerodynamics of a barn.
20 kg may not seem like a lot, but hydrogen has three times the energy content of diesel.