Which formation would win: one with a lot of midfielders or with more attackers if both had the same quality??
it's not (only) the formation.
it's a combination of many things.

Important things
- High quality of players, in a good form, with a good "chemistry"
- Presence (and right coaching) of the manager
- Luck/roll dice

Minor things
- Formation
- Individual orders
- arrows
- b.p.
- supporters
- victory bonus
- training bonus
- special abilities
- morale
- condition