Here’s a simple argument for the conclusion that your gender is essential to you, your essence, haecceity, or identity.
(i) Take Kripke’s essentiality of origins thesis: your origin is essential to you. You could not have originated from a different set of parents. That a particular sperm and a particular egg united at a particular moment (i.e., conception) is essential to you. Had a different sperm or egg united at that moment, you would not have existed. (ii) You originated at conception. Your origin and conception are, in fact, the same event. (iii) Gender is determined at conception. The moment a sperm fertilizes an egg, gender is set. It might be protested at this point that the argument confuses biological “sex” with “gender.” But the arguer need not assume human persons are essentially biological organisms; only that their biological origin is essential to them, and that they have certain essential properties in virtue of that origin. But if human persons are possibly not biological organisms (e.g., they can exist disembodied, or at least with a non-biological body), then they possibly lack a biological sex. What would it mean to say you’re biologically male while lacking a biological body? So either the distinction between “sex” and “gender” is illegitimate, or what is essential to you in virtue of your biological origin is gender, not biological sex. It follows that (iv) gender is constitutive of your origin. Part of what made your origin/conception the very event it was, was what occurred in that event; what occurred in that event was the creation of a gendered zygote. (v) If x is constitutive of y, and y is essential to S, then x is essential to S. So, (vi) your gender is essential to you.