Yes, but the range wouldn’t necessarily be better. IIRC, the Toyota hydrogen semi has a range of about 300 miles. And very little fueling infrastructure (with extremely expensive fuel). EDIT: yup: https://www.hotcars.com/heres-what-you-need-to-know-about-to...
Also, it’d require dumping a lot of heat. I talked to a contractor who once helped make the Nikola One heat exchanger, and he said it took as much power as a Nissan Leaf powertrain just to cool the dang thing.