The Galaxy Z fold 5 and Z flip 5 are protected from temporary immersion in fresh water in up to 1.5m of depth for 30 minutes. However, neither of the devices are completely waterproof.
The Galaxy Z Fold 5 and Z Flip 5 are IPX8 rated, where the ‘X’ means no protection against dust or granular substances. So the devices aren’t dust resistant.