No. 1 seed Carlos Alcaraz beat Dan Evans in a gruelling two-and-a-half-hour matchup at the Shanghai Masters.