Yep Vargas was offisde, he took advantage from an offside position when the ball rebounded off the post. He wouldn't have been offisde if Valdivia had passed to him but since it rebounded off the post, he was offside.
Red is right though, it was super quick and hard to spot.