As others here have said, with a P4 or later, there really are no issues other then common sense.
I fly over the ocean all the time. The biggest risk is getting caught by a wave that is higher then it looks from shore. Chasing waves makes for some great video, but is inherently risky. I have had a few close calls where I thought I had judged the hight and movement of a wave correctly, but had to course correct in a hurry when I realized it would have engulfed my drone. The other issue I did run into wasn’t the water, it was the sand. I usually launch from the beach. Either off a blanket or rock or packed sand. In one case, I bit of sand got in my gimbal and I started getting “gimbal engine overloaded” errors. Blew out the sand and it was fine, but the lesson was learned.