You can use LOS Line of sight to detect the player within certain radius. Then tell the enemy to chase the player.
If the player is out of reach, you cell tell the enemy to standby.
If currently the enemies are running away, probably you told them to do so in your coding.