The fact that some people believe in a gender identity is accepted by medicine and law. This correctly allows those who follow that belief to have freedom of their beliefs where that does not impinge upon the rights of others
I know you think it's a religious belief, and other posted have conflated the scientific study of religion with religion itself. Science has not position on the truth status of religions. This is not like that at all. It's not saying "some people believe they have a gender identity," it's defining what gender identity is. You disagree that it is a useful concept, and you'd prefer it wasn't applied to you, but that does not make it a religious belief.
I have pointed at definitions from the NHS. Here are a bunch more from the vast majority of major national and international medical and scientific bodies. These are not religious definitions. The NHS for example does not have a definition of a soul, nor do they dispute that gender identity is real and applicable to everyone. You can argue that it is like a religion, but medical and psychology organisations don't agree in any instance I've seen so far.
I'll start with Mosby's medical dictionary:
"the inner sense of maleness or femaleness. Differentiation of gender identity begins in infancy, continues throughout childhood, and is reinforced during adolescence. Also called core gender identity."
McGraw Hill medical dictionary: "Core gender identity 'The inner conviction that one is male, female, ambivalent, or neutral.'GI is a major personality trait, that develops in the first 2 yrs of life, and is 'fixed' by the 3rd yr."
Collin's medical dictionary " The inherent sense that one belongs to a particular sex. In almost all cases that sex corresponds to the anatomical sex, but for a small minority, the gender identity is for the opposite anatomical sex."
The American Association of Psychiatry defines it as "(the psychological sense of being male or female)" alongside sexuality and social gender role.
The APS defines it as "to one’s internal sense of being male, female, or something else."
Nowhere that I read leads me to believe any of these bodies think this is anything other than a real thing, like sexuality. Do you know of any scientific bodies which differ from the view?