Polesitter Charles Leclerc clung onto the lead on the opening lap in Baku as Sergio Perez got the better of Carlos Sainz in a smooth getaway.