Somewhere deep in the shop exists one of the most powerful items. An item that can change the way genders work, with alterations that change the entire earth, and these changes will cascade back in time as well so they will always have been.
The device is capable of altering how many people of a certain gender exist, changing everyone retroactively to fit the new demographics. It's also able to change what sexual characteristics and genitals each gender has (a feuture can also be only given to a certain percent of people in a gender) so it's possible to do things like shrink women's breasts to a cups or swap which sets have what genital.
Basically, the device is able to retroactively alter who has what sexual characteristics.
However there's three important rules. Firstly, the device will always leave 2% of people remembering the change. Secondly, the device won't change anything psychological, so people will always think the same, even sexuality and libido can't be altered, it also can't make alterations to non gendered anatomy. And lastly, no matter what the device will always make it so humanity exists, and try to change as little as possible, so even in a situation where human reproduction is impossible it'll still find a way to happen.