The official rule:
A player in an offside position at the moment the ball is played or touched* by a team-mate is only penalised on becoming involved in active play by:
interfering with play by playing or touching a ball passed or touched by a team-mate or
interfering with an opponent by:
preventing an opponent from playing or being able to play the ball by clearly obstructing the opponents line of vision or
challenging an opponent for the ball or
clearly attempting to play a ball which is close when this action impacts on an opponent or
making an obvious action which clearly impacts on the ability of an opponent to play the ball
or
gaining an advantage by playing the ball or interfering with an opponent when it has:
rebounded or been deflected off the goalpost, crossbar, match official or an opponent
been deliberately saved by any opponent
https://www.theifab.com/laws/latest/offside/#offside-position
In your OP picture, the ref has decided the yellow-circled Argentine player is not in active play. A moving video would be more helpful, but from the still, he and the Cape Verde player by him both look to be moving very slowly, away from the goal, and on the right (from the defender's point of view), while the pass is aimed at the left, so the ref's decision seems OK to me.