If the sensor suite is capable of detecting water (which I have no idea what sensors they even have on them, nor their capabilities) I assume it's a relatively easy fix.
Cameras and LIDAR. I am not a self-driving car engineer, but from what I understand, it seems likely that it is possible to detect water with even just cameras, at least under the right circumstances, and with cameras plus LIDAR under a lot more circumstances. But doing so would require proper training data; it's not like there's a "Ooh, that's water" recognizer built into the hardware or whatever.
More to the point, they would have to train it how to recognize that some particular sensor return pattern (e.g. zero LIDAR reflections off the ground) is a problem, and do so in a way that doesn't over-correct for flooded potholes, an inch of water in the street, etc. Presumably, detecting water is the easy part; detecting the depth of water is the hard part unless you know exactly how high the curbs are.
I'm a little spooked when I see Tesla FSD beta demos where the car plows right on ahead through slightly flooded streets as though there's nothing there. It makes me wonder whether it saw it and ignored it or just didn't see it. It's the same feeling I got this morning when someone was signaling me to go ahead at a flashing red light and FSD beta (12.6.4) went right on ahead. I wonder if it somehow saw the hand gestures, or if it just didn't see the flashing red light at all.
That's what makes all this stuff fun.