Ahhhh, I think I understand your question now.

There's two things (that I know of) that govern if your army gets annihilated if you withdraw or lose.

1. When you fight a battle or are attacked, look at the matchup screen. You'll see your character's portraits (or flag, if it's a captain) and the other enemy's portrait on the other side. Look at the bottom right of these portraits for a little red skull/sword icon. If you see that, it means that the army will vanish if they lose or withdraw. If you want to see this in action, go and take your army and siege a city, then go to assault it. When the matchup screen comes up, look at the city's defenders, you'll definitely see the little red skull.

2. If you lose or withdraw from a fight, and have suffered extreme losses, you're army will route and disappear after the battle. I don't remember what the threshhold is, but I think it's like 90% losses or so. For example, if you fight a stack of 1000 men total, and kill at least 900, the others that route/get away *should* disappear after the end of the battle and not survive, in other words that stack is now completely gone.

These rules apply to both you and the AI factions. Hope this helps!