As reported by CBS News, at least two Teslas caught fire in Florida after being submerged in saltwater during the flooding that accompanied Hurricane Idalia. One of...
Teslas are bursting into flames in Florida after being flooded during Hurricane Idalia | Saltwater and lithium-ion batteries are a bad combination::undefined
They are likely IP rated in some form or fashion, that means they are rated for protection for a period of time at a certain depth. Deeper water or longer time in water means you still get water past the seals.
It could also be a control fault or short on the electrical side allowing the other components to catch fire or overloading the batteries causing them to overheat and catch fire.
Water ingress can happen where cables plug into places - literally like a straw that draws water towards the battery pack. Again, if properly sealed, this should not be an issue.
But I can't imagine any modern vehicle surviving being flooded by saltwater. If not the battery then any other electrical component, or even the motor, would corrode over the coming days, weeks, months.
If previous incidents are anything to go by, most batteries that actually react that way are physically damaged during the Hurricane part. Usually the teslas are fine even completely submerged.