IMO space race is best done on continents, and I try to grab the entire continent I'm on. Two main reasons for that are:
1) More prod cities means you can distribute the workload of the space ship components (especially casings and thrusters) out wider, thus working in parallel to complete the ship earlier.
2) Defense is MUCH simpler when you don't have an overland rival at your door. Defend the coasts and let the interior be soft and chewy. This can be done with fewer units, hence, more efficiently once your conquest wars are over. Keep only the most elite of city raid units (for retake stacks in the event of invasion) and all new units are strong at city garrison and/or counterattack.
Also on the defensive front, keep a perimeter of naval units out a reasonable distance away from the continent so that if/when the AI decides to try an invasion, you get advance warning and can swith a few prod cities to units ahead of the war declaration (and bring some of your stacks into the area the AI seems to be gunning for).