Races are mostly clusters in variation within one mechanism - eg. skin color is largely a gradient of more or less melanin, and what gets selected for depends on the environment. It's not intrinsically linked to the whole cluster of race-typical traits, those just are in the same genetic bundle that gets inherited from generation to generation, and most of those traits can be mixed.
Sex itself has a sharp divide from the mechanisms themselves being completely different.