Jannik Sinner made a stunning return to deny Djokovic on his serve to take a break lead in the second set at the Shanghai Masters.