That applies if you’re looking at density per weight - but for most stuff driving around the interesting metric is density per volume, and hydrogen sucks there, even if we’re looking at liquid nitrogen, which is completely impractical for storage here.
To make matters worse, you’re limited to specific shapes for your pressurized tank if you want to optimize pressure it can take (and with that storage volume), while batteries you can stick in individual chunks pretty much wherever you find a bit of space.
That applies if you’re looking at density per weight - but for most stuff driving around the interesting metric is density per volume, and hydrogen sucks there, even if we’re looking at liquid nitrogen, which is completely impractical for storage here.
To make matters worse, you’re limited to specific shapes for your pressurized tank if you want to optimize pressure it can take (and with that storage volume), while batteries you can stick in individual chunks pretty much wherever you find a bit of space.