It really depends on the model, manufacturer, & luck. I’ve never had a phone lose its water resistance. The phone I use today (a 13 mini) is almost five years old and I clean it by running it under the faucet.
It failed soon after from water damage. I had to get it dried out and a new screen fitted, and some functions never worked properly since then.
I expected better as the specs claim IP67 ("Submersible in up to 1 meter of fresh water for up to 30 minutes"), and I used only a little water.
But I mean that's just similarly true of Samsung products. I avoid them like the plague. I haven't had a good Samsung device in almost 20 years, and used to be a Samsung fan