It’s why I go to a very expensive gym where this sort of thing wouldn’t be tolerated. I’m not saying it would never happen (although in all my years I’ve had one comment once and even that was a bit borderline as to whether it was just a misplaced, awkward compliment) but I know they’d take it very seriously if a woman complained. And, frankly, it’s not the sort of place where you get the ‘roid heads and the knuckle dragging fraternity.
But you shouldn’t have to pay your way out of the shit gyms full of creeps, not least because it excludes those who can’t afford those fees.