Beginning to think gender identity is going to be among the very last aspects of the brain to be untangled, because it appears to be associated with variable degrees of neuroplasticity, which are themselves often downstream of other neurological conditions. That and politics.
And of course people who tend one way when the wind blows that way are going to outnumber people with fixed identities by enormous numbers, which means actually detecting and differentiating the groups is going to be a technical and political nightmare.