Ducati's Marc Marquez clinched victory at the Czech Grand Prix, overtaking Francesco Bagnaia to secure his second consecutive win.