First, it's not a decision.  It just is.  And this is not about "sex", it's about "gender"  (the two are not the same and they don't always agree)/

And children do self-identify by gender at that young an age (as early as two or three).  Tell us when did you know you were a boy (I'm assuming you're male - if not when did you know you were a girl_?

But if these children aren't old enough to know that they're a boy or girl the same must be true of all the other children that age.  The little girl that sits behind them?  Too young to know.  The little boy that lives next door?  Too young to know.  The entire kindergarten class?  Too young to know.  And so forth.