THE DECISION
The attacker who was initially in an offside position did not commit an offside offence when the ball went to and was initially played by the winger (their team-mate). After that, a new phase of play started, and the attacker was then onside when the ball was passed to them, so the referee awards the goal.
Read official Law 11 ↗