It only leaves your cart if you refresh the page while the other page turns to 'out of stock'
So my advice is to not refresh the page. Keep 2 tabs open. If you get the 'there was a problem' message...go to the other tab and refresh THAT page until its back.
Then head back to the cart and continue pressing, "proceed"