Not every strategy can be bullet proof. This is one of them. You might have to restart it, since there are some random elements that increase the risk of your pets failing. Don't blame them, please!
The strategy offers a TD script that can be used with the TD Script addon. You can copy the script by clicking on the button to the left of the pets.