This is a common phenomenon in many indie games, and it's something I struggled with as well. Not because it's a difficult solution, but because I insisted it was a dumb solution. I exhausted all other options such as panini projection, rendering a real-time image of the weapon via postprocess - I tried to find ways to prioritize rendering of the view model over the world and they all resulted in strange anomalies. Unless you're going to spend an excessive amount of time to alter engine code, nothing works as well as simply doing this, I promise.
You may have to change the project's near clipping plane in General Settings. I set mine to 0.15 with no issues.
Music:
• Video
Watch video UE4 Quick Tip - First-Person Weapons Clipping through World online without registration, duration hours minute second in high quality. This video was added by user Peanut Games 04 October 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,323 once and liked it 45 people.