A female duck’s vaginal barriers cannot shield her from physical harm. On an evolutionary level, though, they protect her in another way—by allowing her to choose the father of her offspring.
By using her vaginal barriers, she is able to maintain her sexual autonomy in the face of sexual violence.
Our observations also revealed that when a female duck solicits sex with a chosen mate, her cloacal muscles dilate to allow uninhibited entry.
The result is that, even for species in which nearly forty per cent of all copulations are violently coerced, only between two and five per cent of ducklings come from extra-pair matings. As a method of contraception, ducks’ vaginal barriers can be ninety-eight-per-cent effective...
Is there an equivalent mechanism in human females? Why yes, there is. As one would expect, it's framed as a 'disorder': https://en.wikipedia.org/wiki/Vaginismus
No one has seriously examined this as a natural defense against coerced sex, but maybe it's time...