That's not entirely true. If you are purely looking at $/kWh then yes, of course this is the case. However that is not the only consideration when it comes to transport. Weight of the drive unit, use of rare earth metals, lifespan of the drive unit, energy density by weight, speed of recharge, ease of transport energy, and more are all considerations.
I'm not arguing that vehicles will become hydrogen electric. I agree they are not suitable without some serious technological advances. What I'm saying is that at a certain point, larger vehicles (trucks, trains, ships, even aeroplanes) will become more suitable to hydrogen.
Ammonia is significantly more harmful in the event of a leak. Yes, it's more hydrogen dense than pure liquid hydrogen.
Ultimately I don't see a reason to dismiss hydrogen like some are doing. Is it the perfect solution in all cases? Of course not. Does that mean it is not a viable fuel source for transport? Absolutely not.
Scale solves most problems. Hydrogen also has other uses, such as steel production, which further increases the scale.
For light vehicles batter EV is likely to be the leading type for some time, as volume is more of an issue then weight for the ranges we need.