Leverkusen had hoped to keep the Munich-born defender.
Stanisic scored the opening goal in Leverkusen’s 3-0 win over Bayern in February, which put Alonso’s team on course for a debut top-flight title.
“It’s nice to be back home,” Stanisic said, having played 38 matches for Leverkusen in all competitions in the previous season.
“I’ve been a fan of this club for as long as I can remember… I’ve grown in confidence and I think I’m coming back a better player.
“My objectives are clear: give everything for Bayern and win as many trophies as possible.”
Having represented Germany under-19s, Stanisic switched his allegiance to Croatia and played two of three group matches as the side were eliminated at Euro 2024.
© Agence France-Presse
Photo: Twitter @Plettigoal