The Return of Optimus Prime (1) - S3-E29
Continuity mistake: At the end of the episode 'Dark Awakening', Optimus is seen without an eye and an arm, he also has other damaged points, but at the beginning of this episode, when Jessica and Gregory get to Optimus, he is in perfect condition with no damage.
Answer: It is whichever ending you want. There is no 'real' set or canon ending to the war. The only semi-resolution is Beast Wars occasionally hints at the Autobots winning (before the Maximal upgrade). However, Beast Wars is a combination of the US cartoon and the US comic, and excludes most of the Japanese continuity. So it is really up to you as to what you want to believe. Most people seem to 'accept' the US universe, ending with Beast Machines.