Yes, the iPhone XS Max is rated IP68 for dust and water resistance. Hence, submerging your iPhone XS Max in 2 meters of water for up to 30 minutes should result in no technical fault.