Sorry, I explained that wrong. Let me try to explain it from my view. If I'm wrong, please correct me.
Racial features are hereditary. However, the division of races as an IDEA is very much a social construct created by Europeans in early modern times to divide and flex European superiority. That said, race is still mostly hereditary. Someone who is mixed and is racially ambiguous has the racial makeup of multiple races that makes it hard to make them appear as a specific race. Our Vin Deisel example is a great one. The system of racial division due to these differences is very much a social construct. A social construct does not mean these differences do not exist.
On the other hand, in order to talk about gender, we must separate gender and sex. Gender is not sex, as gender is mostly a fluid system of roles and characteristics which includes biological sex (male, female, intersex), gender roles, or gender identity. In many cultures and historically, gender roles and identities change. In countries like Samoa, sometimes these roles blur deeply between lines and roles. However, that does not change persons SEX and much like race, can still end up being ambiguous.
Race, while having nuance as people can be racially ambiguous, is still mostly hereditary as physical racial differences are observable.
Gender, as an expression of femininity and masculinity and the roles between them, is mostly based around a social construction. For example, earlier in the 1900's blue was for girls, pink was for boys or how Ashley was a boys name. It's a system of rules and expression of femininity and masculinity that change over time.