No, there is a bit of a grey area with the rule. Basically, the player has to try to play it (the ball) for him to be onside. So let's say for example he had tried to pass back to the goalie from there and griezmann was offside and got it then he'd be on. But as it was a deflection/not intended it's off. It's a bit of a confusing part of the rule but hopefully, that makes sense.
Here's an example from the prem;
Because Mings was trying to dribble it was counted, but I believe the guidance around this rule was changed shortly after this controversial goal.