Internal server error add to cart

Steps To Reproduce

Add Maximum quantity of product

Register new customer

assignCustomerToGuestCart
https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/assign-customer-to-guest-cart/

Add new product gives below error.

$itemId = $item->getId();
foreach ($quote->getAllItems() as $quoteItem) {
/** @var MagentoQuoteModelQuoteItem $quoteItem */
if ($itemId == $quoteItem->getId()) {
$item = $this->cartItemOptionProcessor->addProductOptions($productType, $quoteItem);
return $this->cartItemOptionProcessor->applyCustomOptions($item);
}
}
throw new CouldNotSaveException(__(“The quote couldn’t be saved.”));

It’s due to above line. item id changed but still it comparing old item id.

Is there any solution or patch available ?

Magento 2.4.7-p4

GraphQL (2:3)
1: mutation AddSimpleProductsToCart {
2: addSimpleProductsToCart(
^
3: input: {
{“exception”:”[object] (GraphQLErrorError(code: 0): The quote couldn’t be saved. at vendor/webonyx/graphql-php/src/Error/Error.php:170)
[previous exception] [object] (MagentoFrameworkExceptionCouldNotSaveException(code: 0): The quote couldn’t be saved. at vendor/magento/module-quote/Model/Quote/Item/CartItemPersister.php:121)”} []