Deleting an order does not automatically delete and deactivate the tickets that were created for the customer. This means that even if the order was refunded or deleted the customer will still be able to use the ticket i.e. when scanning the ticket barcode using the Event Check-ins app the ticket will still show up as valid. When you refund the order, make sure that the option “Restock refunded items:” is checked if you are managing this through WooCommerce. This will update the stock number for your event automatically. You can then delete the ticket. This is in-line with the standard WooCommerce functionality, where you might want to refund someone but still let them keep/use stock.
Canceling an order, however, will set the ticket status to “Canceled”. If an order is “Canceled” then WooCommerce will also automatically return the stock i.e. the number of tickets that are available.
If you are using the FooEvents Seating functionality then you will also have to either cancel the order or permanently delete the actual ticket associated with the order before the seat will become available again. Alternatively you can also make the seat available again manually.
Here are instructions on how to achieve this: https://help.fooevents.com/docs/fooevents-seating/modifying-seats/