Francesco Bagnaia will the MotoGP title fight to the final day as he cruised to victory in the Barcelona Sprint race.