Both of my daughters (8 and 3) have gone "underground" at various times, and in different situations, but for what appears to be the same reason "kids my age aren't supposed to do X" or "kids my age are only supposed to be able to do Y".
DD8 has decided on her own that she can't stay underground very long. She sees it as being polite to the person she is with, when she tries to fit in with them, or be interested in what they do, but the whole time she is only 1/4 of the way engaged in the activity and the rest of her brain is usually singing songs or observing other people or trying to figure out why this other person her age can only do X when she can do XY and Z.
It has been interesting to see her come to accept that she is different and that she is proud of being smart and she wants to be the top of the class
. She still has a hard time when others don't understand her and she gets her feelings hurt, probably more than I know, but she is growing in self-confidence daily and is going underground less and less. We have spent a lot of time finding people who will let her be herself as well as given her opportunities to be the questioning inquisitive kid with wild amazing ideas purely because as a gifted female, I know what it is like to go underground and how bad it makes you feel when you have to pretend to be someone you really aren't. (been there, done that, still do sometimes
).
Our younger DD started going underground at about 2. I was amazed the first time I saw it. I think it will be more difficult to get her to stop going underground because she already compares herself to her older sister. So far it is to ask when she will be old enough to do things, or when she will learn to do other things, but I see it getting more than that in the future. I don't remember DD8 going under so early, but maybe she did and we just missed it.
It helped a lot to give DD8 an opportunity to be herself and to nudge her to be herself in school. (We would do little pep talks on the way to school when I noticed her going underground.) The more often she saw success and positive responses to her being herself the more she did it. (Sort of like self-fulfilling prophecy)