The Toyota Mirai gets 400 miles on a full tank. While a full tank is 122 liter, hydrogen is so light that the weight of the hydrogen is 5 kg. The weight of the tank itself is 87.5 kg. Those are thick tanks.
The energy density of hydrogen is 3 times gasoline, but a full tank of gasoline has about 40 kg of gasoline, so a regular car is carrying more energy potential than a hydrogen car. (The reason it doesn't get more mileage is because it's way less efficient than a fuel cell.)
The explosive potential of hydrogen if it leaks is noted, but has to be compared to the likelihood of a battery electric vehicle spontaneously getting on fire. Those fires are rare, but exploding hydrogen fuel cell cars are even rarer. So far, zero cases, though the number of hydrogen fuel cells vehicle on the road as still small (over a hundred thousand total) so the actual rate is not known.
The economics offer a better argument for the drawback of hydrogen vehicles. But basically Toyota and Hyundai don't agree with that, since they are still putting money on hydrogen tech. It may be seen as a hedge. Sure BEV looks good, but they have billions of cash, so why not bet a hundred million on a side bet. If it doesn't work as good, eh, they can afford the loss. That's what the R&D budget is for. And if the bet pays off, they will hold the patents.