Some dragons (e.g. the Redemption dragon family) have the Reincarnation skill. Upon knockout, a defeated ally will be revived, or healed, if no allies are knocked out.
If your dragon has both the Reincarnation skill and a Phoenix Perk attached, upon its first-time knockout, this dragon will revive a defeated ally and then itself will also be revived. The battle resumes from the same point where it left off.
Remember, both the Reincarnation skill and the Phoenix Perk can only be used once per battle.