Leon Goretzka has scored twice to help Bayern Munich beat Wolfsburg 3-2 and maintain their four-point lead at the top of the Bundesliga standings.