After the bar stewards stole my cat converter, I obviously had a new 02 sensor as well. I stripped the wires and joined them to the existing ones in a plastic junction box. So I'm travelling along the country lanes when in a dip there's a water leak and a small lake across the road. It's about 6" deep and I would have to go miles back to find another way, so I drive through it. Almost immediately, I get the code for 02 sensor. I've tried erasing it but it doesn't go away. So now I don't know whether to buy a new one or wait a while to see if it clears up. So don't go in the water, there may be sharks!
The junction box likely flooded and has retained enough water to keep the error code for a while. It will probably dry out on its own though you might speed things along by opening it up and getting some warm dry air in there.