Yeah, I heard of that, and I think the cases where parents "knew it" can be attributed to people only paying attention to things like "preferred boy toys" if the child then turns out to be a boy.
It's the same reason why people believe in horoscopes and all that stuff - if it happens to be true, then that is taken as affirmation, if it is not, it is soon forgotten.
I am also doubtful of those boys looking like perfectly normal baby girls. The penis is the part of the anatomy that usually develops as clitoris in girls, and if they later develop a normal penis, then that part must have looked somewhat different from a clitoris beforehand. I mean, what happens to the labia? Do they stay in place?
Though I can believe that parents in those cultures look for a penis, and don't pay much attention to not-penises, so that they are genuinely mistaken.
Also, isn't that phenomenon rather more a proof that gender is just a social construct? After all, those boys don't seem to have much of a problem changing their gender role when their penises appear.
I also know of a case where a woman discovered at age 20 or so that she had internal testicles and was actually genetically male, but with androgen insensitivity. I use female pronouns because she never identified as male - if people just knew what sex they are, wouldn't she have noticed?
Perhaps there is a stadium of pregnancy where the foetal brain is imprinted with how its genitals are supposed to look like, and perhaps something can go wrong during that stage.
That would explain old-fashioned transsexuals with sex dysphoria.
It would not, however, explain the wave of men who claim that their penises are female. That is just utter nonsense, based on nothing but the harmful (to women) gender roles men use to oppress us.
There is also no reason why "gender identity" should matter like, at all.
It makes sense to segregate people by sex, because a) men are more violent, as well as having more upper body strength they can use to commit violence and b) even though women could theoretically rape other women in prison, this cannot result in pregnancy, which would be an added danger to the life of the victim.
It also makes sense to segregate toilets by sex because women need waste bins in the toilet, while men ... do not.
Exceptions like the aforementioned person with androgen insensitivity are largely irrelevant, because she could not impregnate a woman by natural means, her likelihood to be violent is probably female-type due to the androgen insensitivity, same for upper body strength.
If it looks like a woman and sounds like a woman chances are it is a woman, and if not, the difference is likely to not be relevant.
Compare that to the reasons why gender identity should be a good grounds to segregate people in bathrooms, prisons, or sports - there are none.
Except perhaps for sports that are traditionally sexist and force women to wear revealing and/or glittery costumes and demand that women look a certain way. But that ought to be abolished, anyway.