Read the rules. Toti purposefully jumps to header the ball, which means Salah is no longer offside.Toti moved into the path of a cross that came in from a distance, he chose to jump and make a clearance with his head. That headed attempt came of the top of his dipped head as he tried to redirect the ball to his left (to the player that slipped?). He could've headed back where it came from or to his right.
Toti fluffed whatever clearance he was trying to make (no doubt influenced by Salah's position) and got underneath the ball, either way what he did was a deliberate act to play the ball and he was under control in his attempt at doing it, that fact he got it wrong doesn't mean he wasn't in control.
Control of the ball does not mean the ball at your feet with time, otherwise every single header or volley would be determined as not in control. Control is an unimpeded act to play the ball, getting that wrong does not equal lack of control.
The interpretation of the rules in this instance is correct, whether or not the rules are fair in this instance is another debate entirely and has nothing to do with VAR or the officials that this game.
It was not up to Toti to decide if Salah was offside. That is the job of the officials. Salah was offside when the ball was played and the flag should have went up then. Are we now saying that if the linesman is too slow to put his flag up then a a player can be onside?
The fact that we all have different interpretations of the VAR decision means that VAR is useless.