I have encountered this bug many many times, where items (guns, ammo, clothing, literally anything) will get stuck inside of a tent, barrel, crate, car, sea chest or other storage container and the item cannot be removed until the server is restarted.
I have found that the most common way for this bug to occur is when you swap an item in your inventory with an item in storage. The item that goes into storage will become stuck, and will stay stuck until the server restarts. It is also possible for items to become stuck without swapping them, I am not sure what causes this however it appears to be random, and when it happens, usually every single item in storage will become stuck, unlike when you swap items and the single swapped item gets stuck.