OnTriggerEnter2D and OnTriggerExit2D trigger non-stop

I have two prefabs which they spawned at the same position. A has capsule collider2d attached and B has circle collider2d attached both set istrigger to true and also rigidbody2d attached.
I gave both objects with different tag, and implement ontriggerenter2d and ontriggerexit2d inside object a.
When i start the game and debugging, the ontriggerenter2d and ontriggerexit2d triggers every frame. However, if I dont implement either one of the trigger, it will just detect one time not every frame.

Am I missing something here?

This behavior seems wrong. Try putting debug statements into your responders that tell you what they hit, something like:

    void OnTriggerEnter2D(Collider2D col)
    {
        Debug.Log( "Enter:" + name + " -> " + col.name);
    }
    void OnTriggerExit2D(Collider2D col)
    {
        Debug.Log( "Exit:" + name + " -> " + col.name);
    }

Hi, thank you for your reply.
That’s kind of weird, your code works well if I don’t comparing tag in those methods.

My code is like following:

private void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision.gameObject.CompareTag("MistakeCollider"))
        {
            Debug.Log( "Entering" );
            collision.gameObject.GetComponent<CapsuleCollider2D>().enabled = false;           
        }       
    }

    private void OnTriggerExit2D(Collider2D collision)
    {
        if(collision.gameObject.CompareTag("MistakeCollider"))
        {
            Debug.Log( "Exit" );           
            collision.gameObject.GetComponent<CapsuleCollider2D>().enabled = true;
        }       
    }

Does it mean one of the collider should not be inside of another collider?