As I recall, Anakin did defeat Sidious. He picked him up like a rag doll and tossed him down a ventilation shaft. This assumes that -- at that moment -- Vader went back to being Anakin (which I think is reasonable).
Anakin twice decided the fate of the galaxy by intervening in situations where beings more powerful than himself were fighting and tipping the balance.
He was the difference in preventing Mace Windu overpowering and killing Palpatine, then again he was the difference in preventing Palpatine overpowering and killing Luke. In both instances a hand was lost, in both instances the weaker combatant was being tortured and in both instances the would be victor falls to a presumed death. Crucially in both instances he is faced with a clear choice of where his loyalties and his conscience lie.
That's no coincidence.