2 objects that have OnCollisionEnter2D cause unexpected behavior

I have 2 object, 1 enemy and 1 player, both of them have scripts with OnCollisionEnter2D inside. The player has a Rigidbody attached while the enemy is not. Both have a capsule collider and another box collider that is set to Is Trigger.
The OnCollisionEnter2D in player does not do anything yet, the following is the OnCollisionEnter2D in enemy script

private Collision2D col;

void Update()
        if (col != null) Debug.Log(col.gameObject.name);

void OnCollisionEnter2D(Collision2D collision)
        if (!collision.gameObject.CompareTag("Player")) return; // the player is properly tagged
        col = collision;

After 2 objects collide, the Debug.Log will print the name of enemy instead of player. If I remove the OnCollisionEnter2D in player script, it will work as intended, the Debug.Log print player’s name and I can use col.gameObject to access the player object. I need both OnCollisionEnter2D on both script, does anyone know what is the problem?

ps: I found a work around by changing “Collision2D col” to “GameObject colObj” and inside the OnCollisionEnter I use “colObj = collision.gameObject” and it works fine for now, but I still don’t understand why enemy can ‘collide’ with itself

The enemy has 2 colliders so one of the colliders can collide with the other one.