Issue:
The page is automatically redirected to the product page and the “…has been added to your cart” message is displayed at the top.
Fix
// Stop redirecting after stock error add_filter( 'woocommerce_cart_redirect_after_error', '__return_false' );