Both shapes of the player are affected by gravity, but only the triangle is affected by the wind. While the square can't wall slide or wall jump, the triangle can. So you have to Shift between them in order to touch all the flags.