You know Mario and Rabbids Sparks of Hope?
(Bear in mind, I have never played this game.) When Rosalina turns bad, she takes control of Bowser’s minions and all of mushroom kingdom. So it’s at this point, Bowser finally realizes: “If I can’t beat Mario, join Mario!” Is that correct? He realizes now it’s best to just fight for Peach and Mario instead of force Peach to marry him like in Super Mario Odyssey.
I remember back in Mario rpg he joins up with Mario and his crew, because his castle was taken and he was left with nothing. So he’s been a reluctant ally at times, maybe even against wario.