When objects in the same group collide, how do you set the set active to false?

this.group=this.physics.add.group({

        defaultKey:'mushroom',

        maxSize:100

    })

    this.physics.world.addCollider(this.group,this.group,this.deletemushroom)

 deletemushroom(A,B){
    A.setVisible(false)
    A.setActive(false)
    B.setVisible(false)
    B.setActive(false)
 }

I’m Korean, so I used a translator.
When the same group collides, I want to set the set active between the collided objects to false and set visible to false, but this applies to non-collapsed objects in case of collision.
What should I do?

What’s going wrong?