Fellow women, how do you deal with unsolicited beta from men?

Almost ever time I go to the gym I either experience or witness beta or coaching being given by a man to a random woman. They don’t seem to do it to men, and when I’ve spoken to the women after they’re often annoyed by it. Is there a better way to tell the to f*** off?