If you leave an Alliance during a War, your defending characters will continue to defend the Helicarrier for the duration of that War.