Stay on your raft! As long as you don’t put even a single toe in the water, they won’t even know you’re there. Learned this after having a panic attack of a Meg being right underneath my raft. Same thing with any dinos you have on your raft.
I had a megalodon called jaws once, and I put him on wander to mate with another megalodon I had, but I forgot I left him on aggressive and he went after a dodo. He got beached and eventually about 4 dodos ganged up on him and pecked him to death. By the time I was there it was already too late. RIP JAWS ~ death by dodo