A PEM electrolyser has an efficiency of around 73% - losses tend to be heat. Electrolyser suppliers have for some time recognised that the waste heat could be re-used. The article below profiles the work done by a Swedish university which proposes re-covering the heat from a 100MW electrolyser and using it in a district heat system.
https://www.pv-magazine.com/2022/07/13/waste-heat-from-hydrogen-production-for-district-heating/
The use of waste heat from hydrogen production in district heating could increase the attractiveness of green hydrogen, according to new research from Sweden.
If this was done then the efficiency of a PEM electrolyser looks more like 94% - similar to a Li-ion battery. This illustrates the importance of taking a whole-systems approach to planning both electrical power systems, storage (in this case H2) and system optimisation.