DJI have replaced drones that were lost flying over water, it does not void their warranty.
There's nothing that's particularly dangerous or risky flying over water.
Certainly there's nothing more risky or dangerous than flying over land.
Whatever you fly over, if the drone comes down, it's almost certainly going to be a write-off.
Flying over water is a lot like flying over land except there are no trees, powerlines, buildings or other things to run into.
On the plus side there are many great picture opportunities out there.
I've flown over 4000 miles over the ocean and I consider it's a safer environment for flying than on land.