Physics2D.OverlapCircleAll returning colliders outside of the area

Hello, I do have 2 objects with same code but one is working fine just attacking when player in range but other Even range is 0 it is detecting player collider and it has damn same code. it working fine all code is working but it shouldn’t.

    // so why even though range is 0 and collider given to code is wayyy far  away this is working?
    Collider2D[] enemiesInRange = Physics2D.OverlapCircleAll(attackPos.position, attackRange, whatIsEnemies);

    if (timeBtwAttack <= 0)            //making sure it isn't attaking always
    if (enemiesInRange.Length >= 1)     // my collider detector 
        Debug.Log(enemiesInRange.Length + "ENEMİES İN RANGE");
        //for giving every one of enemies damage.
        for (int i = 0; i < enemiesInRange.Length; i++)
        isAttacking = true;
        playerScript.GetComponent<PlayerScript>().PlayerTakeDamage(damage);// that code should not work .
        Invoke("AttackComplete", damageDelay);
    timeBtwAttack = startTimeBtwAttack;
    } else
        timeBtwAttack -= Time.deltaTime;

I think it might be problem public variable witch was changed in inspector.

Try changing the variable in inspector for nonworking player

Ok ok I find out,
layer has changed to player ’ s layer so yeah it is in range all the time xd