I suggest you go to Admin > Catalog > Inventory > Stock Options > Set Items Status to be In Stock When Order is Cancelledtry and set it to "Yes". Unless you've already tried thathook on the order_cancel_after
event and refund the ordered quantity using the event.