I'd say we certainly have a baseline that has been very successful for most people. The issue is that it might not work for all people, and there are some that seem heavily invested in the presumption of organs providing identity instead of the reality being a bit more complicated, and that it merely seems like the organs are providing the identity. Kind of like gravitation in Newtonian Physics and Relativistic Physics.
I think sex might simply be your sexual identity and gender is how society allows you to manage it.
"Identity" is an inherently social question; inanimate objects and non-social organisms do not have identities. We know, then, that any sense of "identity" must be on some level socially constructed. Those who are not versed in the social sciences often think that "constructed" means "fake", but that's not really what social construction means. Rather, we take the scaffolding of the observable universe and construct our stories and narratives around it. We build social constructs like gender around the physical traits that denote sex, race around certain favored phenotypes, intelligence around certain cognitive functions, etc. But whatever the objectively observable facts that might underlie some of those concepts, we cannot resist the seem to resist the urge to embellish, categorise, reinvent, narrativize, and anthropomorphize the natural world. The very language of science is infected with this plague, with our talk of "laws" and "constants" and "taxonomy"; social terms applied to natural phenomena that neither think nor feel anything about their own nature or how they "ought" to be organized into comfortingly simple and non-overlapping groups.