Cybertron had not yet been conquered by the Decepticons in 1995 or any years prior to 2005. Because in the late 1990s, the Autobots and Decepticons were busy taking part in The Stargate Battles on Earth, and then all of them either go missing or are deactivated at the conclusion of its massive climax. Which gives leeway for the events of the Car Robots (but not RiD) to occur in 2000.
And after
those characters depart Earth, some of the G1 cast returns to begin construction on Autobot City in 2003. It is here that Megatron, after returning from his disappearance following the Stargate Battles, begins his campaign to conquer Cybertron for good.
However, around this time, Megatron goes missing
again and, by 2004, the Decepticons are led by the time-displaced (and enlarged) Beast Wars Megatron, who, along with several other time displaced characters like Optimus Primal and Star Saber, arrived in this time via the Blasty Zone. And thus began a brief war over the energy known as Solitarium.
G1 Megatron himself didn't return until early 2005, in the form of Reverse Convoy's body. At some point towards the end of this whole conflict, Optimus Prime managed to rid the Earth of all Decepticons, and then the Autobots used the Solitarium to return all the time-displaced individuals back to their respective time periods.
However, G1 Megatron seemed to have gotten his old body back and apparently succeeded in conquering Cybertron right around this time. I guess it was a bad move on Prime's part to remove all Decepticons from Earth, as that must have increased the Decepticons' numbers on Cybertron enough to then finally take it over. Whoops.