Gender dysphoria is a disturbance of the experience of the self, not a disorder of thought (which is what delusions are). A delusion is a fixed belief not based in reality that cannot be understood in the context of culture. What makes something delusional is not whether it is true or not (delusions can be true, and false beliefs are often non-delusional) but the way a belief is held and the reasoning behind that belief. If someone believes something to be true despite all evidence to the contrary with absolute conviction, and even uses evidence to the contrary to support the belief, that may be suggestive of a delusion. Further, if the reasoning makes sense, it is not a delusion even if the belief may seem odd. For example a man may believe his wife is having an affair because she comes home late from work and is more aloof. The reasoning makes sense, even if his belief is untrue, thus it is not a delusion (but may be an overvalued idea). On the other hand if a man believes his wife is having an affair because Donald Trump winked at him on the television, then that is a delusion, because the percept that "donald trump winked at me" does not explain why I know my wife is having an affair. Delusions also move from thinking that into knowing that. It is not just something someone thinks, but something they know with absolute conviction despite reasoning that does not make sense.
Now, someone could have delusions about their sex. In fact, it is not uncommon in the course of schizophrenia and even mania. But if a man had delusions about being a woman, they would have absolute conviction in that belief and the reasoning wouldn't make sense or would be related to perceptual distortions. For example, a man may say "my name is jessica, I heard angels tell me that my parents lied to me all these years because satan got to them and they wanted to stop me carrying the son of god" then he would be delusional. A woman may believe she is a man named mike because she received the wrong mail (addressed to mike) and at that moment she knew she was really mike. Here there is a delusional perception (interpreting an actual occurrence in a distorted way).
A further example: A man may go to the doctor for a cervical smear, who notes he has male external genitalia. The dr states that she cannot perform a smear. The man becomes irate, stating he does not have a penis but a slightly larger than normal clitoris but wishes to have a smear as he was concerned about his risk of cervical cancer which he knows can kill women such as himself. If the man believes this to be true, this too would be an example of delusion. Does that make sense?