1) Either spawn in a ship or create a new core and add a rail basic and a docked entity to it
2) Fire the Admin rocket launcher or admin laser at the ship until it overheats with the docked entities still present. In the case of shipcore + Dock, firing at the shipcore will cause an overheat
3) type /clear_overheating, this despawns the overheating mothership, leaving floating docked entities.
4) Attempt to fire on the now undocked and floating entities. They should be phantom, and unkillable