I have found a solution. I got orders with a status “canceled” after PayPal payment done.
After activating the logs for Paypal in Woocommerce, I saw that in fact Woocommerce used a time out to cancel an order, waiting for the Paypal IPN. Sometimes, instead of taking 1 min., Paypal can take, say, 20 min. to send its IPN check. Thus Woocommerce changed the status from “pending” to “canceled”. The good news is we can change the time out. The trick is to find where. The solution is to be found in the inventory settings.
First, check if it is an issue with the PayPal IPN not being received and the order status being set to pending. You can check by going to WooCommerce > System Status > WP Remote Post and confirm that it is working.
Second, to disable automatic cancellation of pending orders, go to WooCommerce > Settings > Inventory and set Hold Stock (minutes) to 0 or to a longer time (60 min, 240 min., …).