An item (let's call it item 1) mounted on a weapon will disappear when the player switches it via drag and drop with a smaller item (item 2) and there is no room for item 1 in the container (uniform/vest/backpack) where item 2 was dragged and dropped from.
This is due to the different volume items occupy in containers:
An ACO is 1/2 the size of an ARCO/RCO and 1/5th the size of a SOS (1:2:5).
Since there is no room for item 1 it's deleted.
I have only tested this with the sight attachments, I assume other attachments behave similarly.
Inventory operations that would result in a container overflowing should not be possible. Items should drop to the ground, the operation should be canceled or the game should perform a check if there is room in a different container and place the item there.
Tested with the latest DEV build. 0.61.106195