Looking for Waterproof Sunscreen

I recently started taking swimming lessons (because why not!), and since it’s an outdoor pool, I’ve been using sunscreen. However, most of the ones I’ve tried either wash off or turn white and pasty as soon as I get in the water.

Products I’ve tried: Neutrogena Ultrasheer, Nykaa Naturals Sunkissed.

Does anyone have suggestions for good waterproof sunscreens that can withstand swimming? Or could I be applying it wrong?