RB Leipzig triumphed in the battle between fourth and fifth in the Bundesliga by winning 3-2 against 10-man Borussia Dortmund.