That was kinda done with the Prime trilogy. Factions were more or less disbanded/unified and Starscream/Unicron/Overlord became the big bads for both sides to fight.
https://www.thewatchcartoononline.tv...ode-1-the-fall
I think Beast Wars did that too but it was set up to be a Predacon/Decepticon betrayal.
It's been a while since I watched these so memory is fuzzy.