While newer iPhones have some resistance to water, it is really more for light, incidental and accidental exposure. You would be going into a more intense environment with deliberate exposure risk. Devices are not really designed for that.
You might wish to read this support article for what Apple says:
About splash, water, and dust resistance of iPhone 7 and later - Apple Support
says:
To prevent liquid damage, avoid:
- Swimming or bathing with your iPhone
- Exposing your iPhone to pressurized water or high velocity water, such as when showering, water skiing, wake boarding, surfing, jet skiing, and so on
If you do wish to take your iPhone with you, see if a scuba dive shop or a boating vendor can recommend a case.
You may also wish to note: Water and other liquid damage to iPhone or iPod isn't covered by warranty - Apple Support