Isn't it much more nuanced than just boys are better at spatial awareness and maths than girls?
Probably, but as I've said, there really isn't much doubt that in general, boys DO have better spatial awareness skills than girls. I read a book about sex differences in children - one which certainly wasn't slanted towards perpetuating gender stereotypes - and the upshot was that average greater male ability in maths/spatial awareness is the most striking cognitive difference between males and females.
But again I stress - the difference is average and is by no means overwhelming. But it exists. I'll see if I can remember the name of the book and post a link.
Plus, I have no idea how you can control for socialisation, stereotype threat and so on when conducting research.
They do tests on very young children, toddlers even. And sure, even by that age, children may have been socialised into gender roles, but even at a young age, the differences are there. In fact, they tend to decrease rather than increase with age, which would suggest that socilisation may not be a major factor here.
I'm not a biological determinist by any means, and do think a lot of gender differences are down to culture rather than genetics, but that doesn't mean there are NO such biological differences in cognitive abilities.