Needed this a while ago.
Don't worry, the gun itself will be safe and sound and you can get it back from them whenever you want. The problem is with the gun's charging audio, that sound it makes as you hold down the trigger. Once your companion fires that weapon, he/she will permanently have that little charging audio sounding off every 15 or 20 seconds even if the gun is holstered (or even removed from their inventory). That sound just follows them around and after a while it becomes incredibly annoying. Normally this wouldn't be a problem for me since I usually use Dogmeat, but I do enjoy bringing Nick to Far Harbor...but not with that sound driving me crazy.
I reinstalled Fallout 4 and noticed the load times when entering/exiting a building were exceptionally long. Much longer than when I played the game last year. Computer and game settings are exactly the same. The only thing that changed is the GPU drivers. I reinstalled the 373.06 Nvidia drivers as suggested here. The game now works like a charm, with very short load times. I read a lot of stuff about vsync, fps, steam cloud as a potential fix... what worked for me was changing GPU drivers so I'm sharing this here in case some of you have a similar problem.
Open up console, type tcl, hit enter. Boom, you've toggled noclip and your character moves freely to the correct position. Use the same command to toggle noclip back off.Hope this helps!
I stumbled upon this trick while building at Hangman's alley. When in workshop mode, go to Defense and select a machine gun turret. Don't place the item, just have it in your hand. Now you can use the turret to push certain items around. This will let you push those pesky vehicles away from the edges of your settlements, or pull them into the settlement boundary so you can scrap them. Hope this helps!Example: At Hangman's alley there is a yellow pickup truck outside one of the main doors. Using this trick I was able to push the truck out of the corner and out into the intersection. You can push it pretty far away as you have 5 seconds before automatically exiting Workshop mode.