You say play to the whistle but anyone who has played football knows if you see the linesman flag go up you stop, and even if you don’t stop completely you’d hesitate ever so slightly and then remember you need to keep going which is unfair.
Goals scored when the linesman puts his flag up simply shouldn’t be allowed, the linesman shouldn’t be putting their flags up unless they are absolutely certain but then the problem arises that I’ve noticed since VAR came in, you have players marginally offside winning a corner but the linesman doesn’t flag because it’s tight but the corner gains the team an advantage they could potentially score from.
It's why I find the clause of 'gaining an advantage' so frustrating. They apply it to the individual, not the team. But if attacker A is in a clear offside position, so the defence step up and stop to make it clear, then attacker B runs through from an onside position, he gets an advantage in the form of a headstart because player A was offside.