That’s cause of a thing called gender dysphoria. It’s not something every trans person struggles with, hence why some people are more relaxed about their gender, but gender dysphoria can be defined as such;
gender dysphoria
noun
A persistent unease with having the physical characteristics of one's gender, accompanied by strong identification with the opposite gender and a desire to live as or to become a member of the opposite gender.
This feeling is really strong for some people and can lead them to very intense emotions such as sadness or depression, and can even lead them to engage in harmful behavior such as self isolation or even hurting themselves (eg. suicide, cutting themselves, etc)
It’s important to be aware of this stuff and for everyone to be kind to each other, even if it can feel irrational sometimes.