There is a difference between mistakes and errors of judgment and "gender-based harassment or discrimination". Someone may be harassed for a different reason than their gender. For example a personal vendetta or abuse of power vs. systemic discrimination against women (or men or other).