I was struggling with a similar problem and solved it by using inventorify app,
it syncs your products from your shop with your supplier (amazon,etsy, whatever...) and update
the pricing and stock according to changes on your supplier... it saved me tons of hours.
it also have an option of stop selling an item that is currently out of stock at your supplier
check it out: https://app.inventorify.com/
This happens to us as well and I just had an epiphany -- I believe in the last instance someone requested an order cancellation and that restocked the items from that order which were then snapped up by current customers on the site. I had overlooked that until just now. Not sure if it's the same issue with anyone else, but that's why it happened to me.
Gosh this just happened to me too, I haven’t checked the option to allow purchases when out of stock and the product has been “sold out” for a couple of weeks. I don’t have any incoming inventory. Customer followed a link from a tagged product in instagram straight to the product page on my website to add it to the cart. Shopify, please could you have a look at the glitch that has caused this? Not a great look to have to tell my customer that the product she’s purchased isn’t actually in stock!