Water resistant is a lower threshold than waterproof, the latter being harder.
Many phones are water resistant with manufacturers guidance as to time and depth of water it can survive, eg iPhones https://support.apple.com/en-us/108039
As far as I’m aware, after you go to Apple or Samsung for a official battery replacement, there is no advisory issued to say the repair affected the previous level of water resistance
In practice, repairs affect the water resistance, and Apple Store employees will confirm that to you. They just don't want to say so in the product description as it would raise doubts.