Female athletes are being deterred from competing in triathlons, after a new survey detailed over a quarter have experienced harassment at races.