Hello banane,
Thanks for reaching to us.
Unfortunately, there is no such an option. WooCommerce offers hiding out-of-stock products from the catalog instead. You can find the option in the WooCommerce > Settings > Product > Inventory.
Also, when your product is Sold out / Out of stocks the Add to cart button is hidden and the sold out badge is shown on your product. So in general, even if you have the Add to cart button, the product cannot be added to the cart because of Sold out / Out of stocks status.
If you have any questions please feel free to contact us.
Best Regards,