The Yankees have a slightly better winning percentage. You are correct about it being due to the difference in games played. You often see this early in the season; I don’t think I’ve ever seen it this far in.
If the Yankees go 4-2 in their “extra” games, the two teams would be tied. If they go 5-1, the Evil Empire would have a 1 games lead, if they go 3-3, the Sox would be ahead by 1 game.