As for "both positions seem fine for White": well, Black has a significant material advantage after 5...gxf3, so White has to find some compensation. If you don't have a concrete continuation which demonstrates that compensation, I don't think there's any reason to think the engine evaluation is confused.
In both positions, a sensible continuation is 5... gxf3; 6 Qxf3 Qf6; 7 d3. Now in the original position Black has doubled f-pawns and a bad pawn structure; in particular the pawn on f4 can't be supported effectively; when it falls Black will have two isolated pawns. Black stands better but has some weakness that White can try to exploit. In the position with the pawn moved from f7 to g7, Black could play 7... g5 immediately, or alternatively 7... Bc5+ and then 8... g5. Now Black's structure is more solid and White doesn't have anything like enough to justify the material disadvantage.