Assuming the line item on the sales order has been fulfilled and no more shipments for that line will occur, can you cancel the line item which closes the open balance and removes it from Customer Demand?
Fair warning: I have not tried this myself with deviations as you described.