The weapon passes through the walls.

Here is a great tut on how to adjust collision capsule’s radius when coming near walls.

The capsule’s collision overrides all other objects attached to character’s collisions so that is why counting on the gun’s collision to push against the wall wont work.