Charles Leclerc safed second at the Mexico City Grand Prix, aided by a late Safety Car, while Lewis Hamilton finished eighth after a penalty and Max Verstappen claimed third.