Animation sometimes doesn't play until the end, sometimes it doesn't play at all and sometimes it plays more than once.

using UnityEngine;
using System.Collections;

public class Enemy : MonoBehaviour {

public Animator animator;

private void Start()
{
    animator = gameObject.GetComponent<Animator>();
}

public float health = 100f;

IEnumerator Die()
{
    animator.ResetTrigger("isWalking");
    animator.ResetTrigger("isAttacking");
    animator.SetTrigger("isDead");
    yield return new WaitForSeconds(seconds: 0.80f);
    animator.ResetTrigger("isDead");
    Destroy(gameObject);
}

public void TakeDamage(float damage)
{
    health -= damage;
    if (health <= 0f)
    {
        StartCoroutine(Die());
    }
}

}

using System.Collections;
using UnityEngine;
using UnityEngine.AI;

public class EnemyController : MonoBehaviour {

public float lookRadius = 10f;
private bool isWalking = false;
public Animator animator;


 // public Animation walkAnimation; 

Transform target;
NavMeshAgent agent;

// Use this for initialization
void Start () {
    target = PlayerManager.instance.Player.transform;
    agent = GetComponent<NavMeshAgent>();
    
}

// Update is called once per frame
void Update()
{
    float distance = Vector3.Distance(target.position, transform.position);

    if (distance <= lookRadius)
    {
        animator.SetBool("isWalking", true);
        animator.SetBool("isAttacking", false);

        agent.SetDestination(target.position);

        if (distance <= agent.stoppingDistance)
        {
            FaceTarget();
            animator.SetBool("isWalking", false);
            animator.SetBool("isAttacking", true);
            StartCoroutine(WaitBeforeAttack());
            
           
        }
    }
}
    
IEnumerator WaitBeforeAttack()
{
    yield return new WaitForSeconds(1);
    TakeDamage();
}
void TakeDamage()
{
    GameObject.Find("Player").GetComponent<PlayerHealth>().playerHealth -= 10;
}

void FaceTarget ()
{
    Vector3 direction = (target.position - transform.position).normalized;
    Quaternion lookRotation = Quaternion.LookRotation(new Vector3(direction.x, 0, direction.z));
    transform.rotation = Quaternion.Slerp(transform.rotation, lookRotation, Time.deltaTime * 7f);
}

}

Try adding debug logs and see when/if they trigger to get a better idea what might be causing it.

It could potentially be an issue with your animation controller parameters. What are your animation state trasitions like? For example, one particular settings forces the AC to wait for the animation to “finish” before moving to the next animation. You can “Break” this to quickly switch between animations.

using System.Collections; 
using UnityEngine; 
using UnityEngine.AI;
    
public class EnemyController : MonoBehaviour {
    
    public float lookRadius = 10f;
    private bool isWalking = false;
    public Animator animator;
     
    // public Animation walkAnimation; 
    Transform target;
    NavMeshAgent agent;
    
    void Start () 
    {
        target = PlayerManager.instance.Player.transform;
        agent = GetComponent<NavMeshAgent>();
    }
    
    void Update()
    {
        float distance = Vector3.Distance(target.position, transform.position);

        if (distance <= lookRadius)
        {
            animator.SetBool("isWalking", true);
            Debug.Log("isWalking = true");
            animator.SetBool("isAttacking", false);
            Debug.Log("isAttacking= false");
            agent.SetDestination(target.position);
    
            if (distance <= agent.stoppingDistance)
            {
                 Debug.Log("call FaceTarget()");
                 FaceTarget();
                 animator.SetBool("isWalking", false);
                 Debug.Log("isWalking = false");
                 animator.SetBool("isAttacking", true);
                 Debug.Log("isAttacking = true");
                 StartCoroutine(WaitBeforeAttack());
            }
        }
    }
         
    IEnumerator WaitBeforeAttack()
    {
        yield return new WaitForSeconds(1);

        TakeDamage();
    }
    
    void TakeDamage()
    {
        GameObject.Find("Player").GetComponent<PlayerHealth>().playerHealth -= 10;
    }
    
    void FaceTarget ()
    {
        Vector3 direction = (target.position - transform.position).normalized;
        Quaternion lookRotation = Quaternion.LookRotation(new Vector3(direction.x, 0, direction.z));
        transform.rotation = Quaternion.Slerp(transform.rotation, lookRotation, Time.deltaTime * 7f);
    }
     
}