Why wouldn't VAR have disallowed that?
Because it was part of a different attack. Between Salah being "offside" and Keita scoring, we took possession of the ball back (and gave it away!). The attack for the Keita goal was considered as having commenced when Trent picked up the loose ball on the right hand side, and crossed it in. Salah being "offside" was part of the previous attack. VAR only goes back to the start of the attack which directly lead to the goal.
Here though, it was all the same attack.
.