More to the point, talking about sex and gender in the same breath is quite often absurd. Gender theory is a sociological theory, not a scientific one, and while sociology is a useful tool for certain problems, it's hardly reproducible, or falsifiable.
Edit: on second thought, we're not so much in agreement as nothing is fully genetic or environmental. There are, for instance, cases of XY females. I'd agree if you said the genetic link was orders of magnitude stronger between genes and sex, but the "100%" perpetuates a common misunderstanding of genetics.
I suppose you could induce something like that by treating an embryo with finasteride or another SARM but there's a reason such drugs are in pregnancy category X. They tend to produce wider ranging and more severe defects than just changing the sex of the embryo. Hormones are complicated.