easiest way is to have a bool variable that you set to true on mouse enter, and false on mouse exit...
var playedSound = false
func myMouseEnter(event):
if not playedSound:
mySound.play()
playedSound = true
func myMouseExit(event):
playedSound = false