For Toyota, the representative company of Japan, it's not easy decision to all in to BEV because of energy situation. Japan is going to be stuck for global decarbonize campaign because the land/grid is too small to make stable distributed renewables, and obviously nuclear is no longer future option. Making BEV (or Li-ON battery) is energy intensive so it won't competitive with other decarbonated countries for future carbon tax era. That's why they must investigating hydrogen, solid state battery, xEV, and so on rather than just BEV. Other companies investigating other techs like co2 collector.
Investigating hydrogen for other uses like truck, ship, storage, emergency generator looks reasonable (Toyota also sell fuel cell system for various use), but still I doubt is they serious for hydrogen car like Mirai, or it's just a demo or for special case.