Gun moves through the wall

When player stay too close to he wall, gun moves through it. How can I fix it in the easiest way? I tried to increase character controller radius, but than player can’t move in the narrow corridors

Option 1: Make the gun much smaller but closer to the camera.

Option 2: Use a 2nd camera that only renders the gun on top of the other cam.

Check this: