There’s a good likelihood that alternating can pass STDs/STIs.
In essence, it’s sort of like a used condom and if one of the partners has an infection, that infection can pass on to another partner while switching.
For each new sex act, a new condom should be used.
Let’s say, the guy is switching from one partner with whom he had anal sex and moves to another partner for vaginal sex. A new condom should be used since the bacteria from the anus could be introduced into the vagina, leading to a higher risk of catching STIs/STDs. And vice versa.
So, always change the condom whenever a new sex act is about to happen. Stay safe, play safe!