The rule is that attacker always lose if 1) time runs out 2) everyone is dead.
The game helps to deal with a tie by running tie break ( increased damage after about 35 rounds ). This feature is, however, suspended during war. So it looks like you were a victim of the rule 1) in this case.