Suggestion :-
The stock gets assign against the trasnaction in which actual goods gets transfer like despatch and distribution issue and adjustment issue receipt
you can deallocate the stcok by editiing the transaction and droping the line items and saving the transacation