High school STEM courses have a very low bar, grades in them doesn't say much about someone. It is more about being careful and never screwing up than being excellent at the material since there are so many easy STEM courses in high school. For example, a lazy genius might get all A's in math but get a B in chemistry. There is no better grade than A in math, so a typical hard working high schooler with A in every course will look better in this study even if the other person is actually way better at math and aces the SAT and places well in math competitions.
And if we do look at stuff like SAT or math competitions then it is basically just men, very few women at the top there. So it looks like women do better when the ceiling is so low that the male variability doesn't show.