If you have been attacked, wait to exit the shield until you are about to make the attack.

Why?

Although not always, being under shield is an advantage, since, in order to attack you, they must break that shield and it can only be done with the shield buster (an A+ card).

How should it be done?

Stay one or two away from leaving and when you are going to attack (because you already have enough energy or because you want to join an attack), repair the green hulls you have left and then launch your attacks.