It doesn’t prevent the rape, but they do have “cul-de-sac pouches en route, that could prevent fertilisation by capturing unwelcome sperm.” So they can choose whether or not they get fertilized. Which is at least some sort of a defense. Edit: link for quote