You're suggesting that if they have had their genitals mutilated, they will not be obviously the opposite sex? I mean, I'm not really sure that can ever be the case. Small children, maybe. But a small child takes time to develop a sense of personhood anyway. But as a person grows, the differences will become more marked.
And you need to be asking yourself some questions about the interplay of all factors when it comes to how gender is constructed socially. I'm not a blank-statist, so I think that the hormones in a human male, for example, will be a factor that, when combined with socialization around aggression and entitlement, create what we perceive to be the 'masculine gender'. Transactivists wheel out the existence of sex being more than chromosomes as though feminists had no idea before someone wrote an article about it Medium.
The existence of a male balance of hormones in a male body creating feelings is a physical sex thing. Not a gender thing.
It really does all tend to come down to defining terms. If someone is a male, and this is disguised some how, but they know they are a male none the less, then they simply know their sex, because they indeed are that sex.
So I guess my counter question, in an attempt to try and tease out what it is you're asking here, is what do you mean by 'know they are male'? Because obviously, they are male. So that's not a feeling, it's a fact. What does feeling like a male, or a female, mean?