Background Pony #B127
G5 does take place after G4, but with G4 ending differently.
It's possible that G4 didn't end the same way we saw in FIM. What if the Legion of Doom succeeded in separating Equestria? The Mane 6 could have been defeated, which would explain why we only saw their pre-finale forms in the G5 movie. As for the windigos, they too could have been vanquished, but in a different way than uniting everypony together.
So, G5 could be what happened
if Cozy, Tirek, and Chrysalis accomplished their goal and separated everypony. And if they were defeated after this separation, the damage would have been already done.