Both the iPhone 8 & iPhone X received an IP67 rating (IEC 60529), where "IP" stands for "Ingress Protection," the "6" signifies the dust protection rating which is equivalent to "entirely dustproof," and the "7" signifies the level of water resistance. In this case, that the phones can be fully submerged in water as deep as 1 meter for a period up to 30 minutes.
With that said, you can draw any conclusions you like as to the answer to your question.
Ref: The iPhone 8 & iPhone X Are IP67 Water-Resistant - iosgadgethacks.com