You're right. But the point is lithium ion batteries are too unstable. Look at the BYD blade battery (lithium iron phosphate), it did not burst into flames even when punctured.They are but is the cause of the fire because the battery being a Lithium Ion in the first place ?
The battery wont spontanteneously combust by itself, not without something else causing it. maybe overcharging, overheating or some design defects ? Who knows.
I wouldn't include such a technology in any military vessel where the use conditions make the risks outweight the benefits, and submarines are a waaaayyyy riskier environment than even that.