I migth be innaccurate, but the way I recall it is that Bernal attacks, Lopez follows and when the rest of the group gets up to them Yates counterattacks and neither Bernal nor Lopez can follow. Then Bahrain pulls in the front group and only Lopez chases but he's unable to reduce the gap. In the flat before the penultimate climb the group of Lopez/Bernal is joined by a group coming from behind and Rojas starts pulling. The gap at that time was around 4 minutes, so podium was clearly lost.
I have a hard time believing he was asked to stop chasing unless it was that late and just meaning it's lost, it's no longer worth the effort of going full gas.