Shadow doesn't leave if all the other members are dead.
I once played a mono-playthrough using Shadow, the game forces him to leave at just before the Verdt. Interestingly enough I didn't get a gameover despite Sabin and Cyan having 0 health.
--
BOP Results: http://charmander6000.webs.com/GotD%20BOP.xls
Congratulations to Black Turtle for winning the guru contest.