AmGiftCardQuoteExtension Plugin fails due to Foreign Key Constraint

AmGiftCardQuoteExtension Plugin fails due to Foreign Key Constraint

I am using this plugin via graphql. I added a purchased Amasty GiftCard to a cart using the 
applyAmGiftCardToCart mutation and calling the placeOrder mutation I get an error. 

After debugging the error was being thrown by the afterSave function in module-gift-card-account/Plugin/Quote/CartRepositoryPlugin.php

public function afterSave(CartRepositoryInterface $subject, $result, CartInterface $quote): void
    {
        try {
            $this->saveHandler->saveAttributes($quote); <--Problem
        } catch (LocalizedException $exception) {
            $this->logger->critical($exception);
        }
    }

I get the error below
[2025-01-15T02:05:05.864368+00:00] report.ERROR: Payment processing failed in PlaceOrderAfterSave Observer: Unable to save new Gift Card Order. Error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento_dev`.`amasty_giftcard_order`, CONSTRAINT `AMASTY_GIFTCARD_ORDER_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE), query was: INSERT INTO `amasty_giftcard_order` (`gift_cards`, `gift_amount`, `base_gift_amount`, `invoice_gift_amount`, `base_invoice_gift_amount`) VALUES (?, ?, ?, ?, ?) [] []

So it seems that Amasty is trying to insert into it's table but the orderId constraint fails because it hasn't yet been saved to the sales_order table?