Character goes through object when animator is enabled

I have rigibody and collider in my character rig but when I turn on animators it just goes through object but I can still detect collision through script but I don’t want it to go through object. When I put a box collider as the same level as animator it works but I want it in the character rig