First of all, as a male sensing a feminine self of some sort or other is not abnormal. It is entirely normal even when that sense of self is strongly female-like. Second, you are not female even though the sense of self is very strong and makes you feel like you think a female feels - it isn't, not exactly.
Separate things out - you are sexually and genetically male. But your sense of self is not produced by the fact you have XY chromosomes - that is not possible. But there may be influences from your X chromosome and the other chromosomes that affect the way you react to the world and perceive the world. That in turn causes you to react to experiences in your life and even when you were still in your mother and your brain was developing that caused the production of neural networks that are configured in a way that is very much like the configurations in a female.
However, you also have neural networks that are male-like and create male-like behaviors. Which happens depends on the circumstances at the moment. You and all other males can use female-like behavioral reactions if appropriate for the situation. It is just that as a result of the development of your brain you happen to have a lot of female-like neural networks - it's OK. In fact, sometimes it is beneficial. But you tend to develop a preference for one or the other because the preference feels better and produces the most comfortable sense of consistency.
Eventually you may develop a strong affinity for the form that, in your life and with your individual configuration creates the best solutions and feelings. Sometimes that female-like side takes over almost completely even though sexually you are still purely male. Even if you transition you are still male, but your identity is consistent with the behavior of a female.
So as a result of blending a bit of genetics and a lot of successful reaction to situations your neural networks can become strongly biased toward the female-like side which then directs your behavior and your expression of your sense of self. No magic; just a normal variation. And very much the same thing can happen to a female; it just works the other way around.