That's because the water in your pool was warm, and in OW it was much colder. During my first course, instead, we did train in an open-air pool, where the water was barely at 14 °C, so quite cold. When at the sea, instead the water was 21-22 °C, much warmer...Back when I got certified I had no trouble with mask flooding, removal and replace in the pool. What I was not prepared for was it triggering mammalian diving reflex when I did it in 45 degree water during OW. I still remember having to calm myself and allow my lungs to start working again before I could complete the drill.
I still hate doing it in cold water, but I make myself practice it from time to time.
So for us the problem was in the pool, not at the sea.
And yes, the colder the water, the more easy is for the neonatal mammalian reflex to be triggered.