When your product is out of stock but you still want your customer to buy it. Don’t worry! You can use the “Pre-orders”, check on this link demo: Pre-orders button
Just need to do these steps, the customer still buys the product even when it’s over.
Go to Product -> Choose the product you want to set.
Tick on “Track quantity” and “Continue selling when out of stock”
Then check on the preview link product.