Thanks for your question and welcome to the community forum.
According to the logic configured by our developers, orders placed through dragging the TP/SL levels off existing positions/orders on your chart are technically not part of the OCO group. This can cause lingering orders like you mentioned.
In order to prevent this, you can open up your working orders window and while holding CTRL on your keyboard, left click each additional order that you have created that you would like to cancel once your position has been flattened. After the orders are highlighted, right-click them and click LINK OCO as shown below:
Once this has been done, you should notice that the order type now changes to (OCO). If you see this, you know you have done it correctly.
We have recommended that our developers change the logic of this functionality and as soon as it has been updated, we’ll make a post about it.
Optimus Futures Support