With a given amount of power, would a higher or lower frequency electromagnetic wave travel farther?

I’m thinking specifically about submarine sonar sensors. If two waves were emitted in the same medium (ocean water), with the same negligible environmental interference, and at the same power, which would travel farther? I know a typical sonar "ping" is high pitched (high frequency), but is this because it travels farther or because it is easy to differentiate from other noises when being detected.

The higher the frequency, the more signal loss is suffered over a given range through absorbtion (transfer of sound energy into heat).