Leon Goretzka scored the decisive goal as Bayern Munich opened up a seven-point lead at the top of the Bundesliga with victory over closest pursuers RB Leipzig.