Water resistant means the ability to resist water penetration in the phone to a certain degree, but not entirely. That's why water resistant phones comes with IP rating (
learn more about different ratings). Each rating shows the level of protection.
Let's take example of IP68 rated phone. Here 6 means the phone is completely protected against dust and 8 means you can put a device in water up-to 1m (or, 3m max). If you go beyond 1m or keep your phone in water for a longer period of time, the water may get into the phone
Water proof means the device is completely protected. It doesn't have any ratings and it doesn't matter if you put the device in water up-to any depth or time. The device is impermeable to water.