"Earth" doesn't work the way you might think.
In any case, on a vehicle of almost any kind, "earth" is replaced by "metal chassis".
Your question is based on a very common misconception: that electricity wants to return to earth. Actually, electricity wants to return to source.
- For instance, electrons at a battery's negative terminal want to return to its positive terminal.
- The positive terminal is electron-deficient, but it hungers for electrons from the negative terminal; not any of the phases from the isolated 3-phase delta generator nearby.
- Current from one of the phases from the generator wants to return to another phase, not the battery and not the station chassis or that big blue marble down there.
All this is confused by a technique used in mains wiring: where the largely-isolated AC power systems are intentionally bonded to earth. I have run a normal 120/240V AC power system fully isolated. But it can float up to unexpected voltages; indeed I had a 120V leg jump up to 240V above ground, and neutral floated at 120V above ground. Imagine if it had floated to 2000V above ground, say, due to a transformer leak? To prevent this, we add an equipotential bond to clamp the system to a near-earth voltage. It's cheapest to bond directly to one system wire, and that wire is labeled "neutral".
Because of this equipotential bond, "hot" still wants to return to source (neutral or another hot) - but earth will do, only because it's connected to neutral. That is where that misconception comes from.
On a vehicle, the idea of "earth" is replaced by "chassis". The choice to either bond or fully isolate is made on a case-by-case basis. Generally you bond one system and isolate the other(s). (Cars, diesel locomotives: low-voltage; electric subway cars: high voltage because you have to).
And on vehicles, the chassis is often also used as a normal current return for the bonded system, effectively merging the function of ground and neutral.
An isolated system typically has one connection to chassis: via a "ground-fault relay". Any leakage current to chassis will attempt to return via the ground fault relay, tripping it.
I assume spacecraft will be like aircraft; the choice to bond vs isolate will be decided on both safety and weight considerations. Lower voltages need thicker wires to carry the same effective power, so they benefit most from a massive chassis as a current return.