I am having a similar problem.
When I click the tick box next to “I have a limited number of this item in stock” and enter a quantity, it only works for those items that have no variations.
When a product has variations (ex. small, medium, large), no matter what stock quantities I put in, it says “This product has sold out” on my website.