I created battle end event with Block Move AI checked on and dialog window opening. I overrode with this event in Battle component's Battle End Events section as a defeat event.
Also I did death animation event for the player.
When player dies, death animation event is triggered and player falls dead. Battle end event is not triggered because foes continue to move and no dialog is opened.
Player and foes are spawned inside battle collider if it helps.