A knight pawn on the seventh also loses to the queen: the stalemate tricks available to rook and bishop pawns do not exist here, so the zigzag works.
Queen versus a g-pawn (or b-pawn) on the seventh is still a win even though the pawn is next to the edge. Why does the defender not get the stalemate resources of the rook pawn? Because with the king on g1 blocking the pawn there are always free squares (f1, h1, h2, f2) and no capture-with-stalemate pattern arises.