Hey there, Rhea.
I'm not sure I understand what you're asking. Are you asking how sperm cells that are deposited into the vagina could stay hanging around in the vagina or inside the cervix during a menstrual period? If so, then the answer as I understand it is that it wouldn't be all that likely, given the outward flow and gravity as well as the acidity of the vaginal environment at the time.
However, in the event that someone had very light flow, particularly if it was barely spotting, then potentially it could, but it wouldn't really matter if it did stick around then, since timing-wise, it would be nigh unto impossible for it to hang around long enough for ovulation.
Never doubt that a small group of thoughtful, committed citizens can change the world. Indeed, it is the only thing that ever has. - Margaret Mead