With the introduction of the iPhone 7, Apple has started to apply a thin double-sided adhesive seal between the display and housing of the phone, allowing the phone to have a water-resistance feature.
The iPhone 7 through the iPhone X have a IP67 rated water resistant seal, with the XR, XS series, and 11 series having an IP68 rated water resistant seal.
iPhone 11 Pro and 11 Pro Max have a rating of IP68 (max depth of 4 meters up to 30 mins).
iPhone 11, XS and XS Max have a rating of IP68 (max depth of 2 meters up to 30 mins).
iPhone SE (2nd generation), XR, X, 8, 8 Plus, 7, and 7 Plus have a rating of IP67 (max depth of 1 meter up to 30 mins).
Splash, water, and dust resistance are not permanent conditions and resistance might decrease as a result of normal wear.According to Apple.com
We strive to keep your iPhone as close to OEM as possible by replacing these seals with your repair. We take the extra time to remove the old adhesive, clean the frame, and replace with new adhesive, to keep the phone water resistant like it came out of the factory. This small procedure takes less than 5 minutes to complete, yet so many budget repair technicians fail to do this, simply skipping over the step, and can result in catastrophic failure of the phone.