Old allocation for Invoiced deliveries still showing in STOALL TABLE

I run a query to see which allocation records on the STOALL table are still available. It is a long list.

My understanding is that when a Shipment is validated the allocation are cleared since the product is no longer available in Inventory. But still there is so many records of deliveries, sales order ( already closed) and Allocation for closed Direct orders.

Any ideas what it could be and which parameters have to be set to clear out this records.