You can hide products that run out of stock in Shopware 6 under Settings -> Shop -> Products (or Product Lists). Activate the Hide products after clearance parameter.