Borussia Dortmund got a first win in Munich for the best part of the decade to leave defending champions Bayern 13 points behind leaders Bayer Leverkusen.