You should understand that fuel cells will continue to improve in efficiency. 40% today will mean 50% tomorrow, and likely 60% at some point in the future. Losses for transport and compression of hydrogen is a surprisingly small amount. In fact, its more efficient to pipe hydrogen over long distances than to transmit electricity. In additional, you can always reuse the heat in either CHP or thermal energy recapture.
It's also important to realize that the electric grid is not perfectly efficient, nor is charging a battery. You're likely to lose around 30% to these types of losses. This figure is going to get worse once grid energy storage and long-distance power transfer become necessary. Combined with your 15% loss pushing the extra battery weight and it really does start to add up. Worse if you look at cold weather performance. The notion that fuel cells can never match batteries on efficiency is a very short-term worldview.