It’s simple: use any magic-based weapon, and you’ll be able to fly through water and move around naturally.
I died doing that because I was moving so slow
Use the Ice Wand—you can get it from an Ice Slime—and try to avoid staying in the middle when facing the boss.