Harry Kane scored twice and Joshua Kimmich netted the winner as Bayern Munich defeated rivals Borussia Dortmund 3-2, extending their Bundesliga lead.