If that behaviour only happens in the water, I am really at a loss to what it means. How long does it last if the other dog tolerates it and what happens after?
But what you can do is not so different from any other (on land) behaviour you want to undermine: Call her back. Instantly. When she starts swimming in the direction of another dog she needs to come back. Interactions with other dogs for her will be limited to outside of the water. When she does not come back, today there will no more balls be thrown. Fun is done when you make it "not fun" for other dogs/humans.
Maybe at some point you can train her with the help of a dog that would tolerate her behaviour. (But only at the point where she would definitely instantly come back to you if called.) Then you can let her approach but again call her back when she shows the slightest inclination to touch the other dog on the neck. This is the step where you teach her "correct", friendly interaction is okay, anything else will again stop all the fun instantly.