Player cannot destroy enemy

I have a game in which my main character “dashes” which triples their movement speed and allows them to destroy enemies.
Player Code:
//Starting Dash Coroutine.

        if (Input.GetButtonDown("Fire1"))
        {
            if (timeStamp <= Time.time)
            {


                StartCoroutine(Dash());

            }

        }


        
    }

    public IEnumerator Dash()
    {
        isdashing = true;

        normalspeed = dashspeed;
        yield return new WaitForSeconds(dashtime);

        normalspeed = speed;


        timeStamp = Time.time + coolDownPeriodInSeconds;

        isdashing = false;

    }

Enemy Code:

 public Movement player;

	
	

    public void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.tag == "Player" && player.isdashing == true)
        {
            Destroy(gameObject);
 
        }
    }

However, the player does not destroy the enemy. Collision detection works fine, both with other objects AND with the enemy (the player just collides/ bounces off of them. What is the problem with my code?

Looking at the enemy code, I guess you can start off by checking some information using debug print outs, to find the underlying issue

Inside OnCollisionEnter could you do the following:

         public void OnCollisionEnter(Collision collision)
         {
             Debug.Log(collision.gameObject.tag);
             Debug.Log(player.isdashing);
             if (collision.gameObject.tag == "Player" && player.isdashing == true)
             {
                 Destroy(gameObject);
      
             }
         }

You need to check to see if the tag is correct and that the player is dashing, I guess one other question is how are you getting the player gameobject (Movement player)? since that could be the issue.