Adding a custom product to the cart works intermittently

I have encountered an issue where adding a custom product to the shopping cart works intermittently in my store
To reproduce it go to

  1. Visit the following URL.
  2. Open your browser’s Developer Tools and navigate to the Network tab.
  3. Look for this POST request. The response to this request should contain two elements.

Expected response

[
    {
        "id": "12345678901234",
        "quantity": 1,
        "properties": {
            "Size": "3"
        }
    },
    {
        "id": "98765432109876",
        "quantity": 1
    }
]

Please note that the second ID depends on the diamond selection.