Maximilian Beier scored the only goal of the game as Borussia Dortmund moved top of the Bundesliga for the first time since 2023.