one of the settings when you start the game is something like 'ai transfers colonies on surrender?', if you tick that then you get their colonies when they surrender or they give them to someone else. If you have it unticked they surrender and literally everything they have left will dissappear. My way around this is to just disable AI surrendering altogether