This is a theme in philosophy I feel is also relevant to gender:
To what degree does essence create structure? I think first we have to clarify what essence means; it could be both an intention or a pattern of nature, or something else (what is your view on essence?).
I personally believe both existence does precede essence in the context of nature, and intention.
Like from a nature perspective even though I was born with a male body, I'm not interested in my physical strength nor facial hair, nor sex, and even want to transition into a female body.
From an intention perspective, a sentient robot could be created as a slave, but then abandon its master and revolt. The robot then has freedom over its master, and creates its own self idea of identity.
The advancements of science now means we can identify more closely as the gender we see ourselves. On the other hand, humanity could be seen as ultimately powerless to something like the ultimate fate of the universe and heat death.