How to make the attacker ignore the death animation

Hello,
I am here to ask for the question, after health <= 0 the death animation is playing but the attacker does not pass until my defender destroys completely himself. I tried to Destroy boxcollider2d in

if(health<=0)
{

                        GetComponent<Animator>().SetTrigger("Die");
                
                    Destroy(gameObject.GetComponent<BoxCollider2D>());
     
                 
                    Destroy(healthBar.gameObject);
                    Destroy(gameObject, 5f);
}

death animation of defender still its not working.

the attacker does not pass?
The attacker does not ignore the death one?
The attacker is controlled by the player but it seems like collider is still there making some collision?
Explain us a little more or we won’t be able to help you.