The player gets stuck in collider when the scale is increased

I have a character that can increase and decrease in the game. I do not know how to make it so that when it is small and presses the magnification in a small passage, it dies from compression, and not just gets stuck in textures.