You can manually tell your turrets/ships to target something else, but you will have to keep a close eye on this.
Or you can turn them off, put them in low-power mode, which prevents them from firing.
I tend to target carriers first, with some grav-turrets they dont get far away from the gate, where I have lots of tractor-turrets, which again lock the fleetship in position so my defences can first take care of whatever isnt caught by the tractor-turrets.
This becomes more important when you get waves of 7k 'swarm' units, stopping 6 carriers takes a while, where having 7k tiny foes on a defensive planet is less problematic as having 6k tiny foes on the planet .. AND 1k on your homeplanet ... (no matter the balance in power, that 1k on your homeplanet is more important to take down than the 6k on a defensive planet).
However .. letting carriers slip past isnt a big issue .. as long as you have nothing there that can pop the carrier while you are not there supervising it.