Location at the top of the screenshot.
Add this section to the Remove Sight Attachment collapsed node and copy it you will need to add this to all the attachment collapsed nodes in the Remove Weapon Attachment function.
After pasting one in to each collapsed you will need to replace the item node search for item and readd the item node, then split the pin. as shown above.
You will also have to change the weapon attachment class pins to the collapsed node type e.g. remove magazine collapsed nodes you will the magazine pin and connect it to the class defaults node.