I do not think that is correct. Leaving play is a consequence of being defeated. In fact, in the rules (LEAVES PLAY section) it is mentioned that:
Defeating a character, discarding a card from play, placing a card in the victory display, or removing a card from the game are all different means by which a card can leave play
This implies that both effects (discarding and defeating) happen simultaneuosly. Leaving play cannot happen before being defeated because leaving play is a consequence of being defeated.