Minor bug with the god mode and the minor factions dlc. If for whatever reason your envoy stops allying a minor faction, the minor faction's units will turn hostile and attack you, but will still be invulnerable.
Frustratingly, this doesn't apply to the planet itself, enemies can still destroy the planet through bombardment, meaning if your envoy gets distracted by an attack, the enemy can end up destroying the minor faction before you can recapture it, and you end up with a fleet of hostile. invulnerable ships.
Turning god mode off and on again doesn't fix this. It will turn off god mode for the minor faction's units, but turning it back on will give the minor faction invulnerability too.