Because I think you’re setting the coordinates of the enemy to the player’s, thus ignoring the navmesh, and just teleporting inside the player.
Finally, set a distance minimum distance between the enemy and player as well -so that the enemy stops moving towards the player when it gets too close.