diff --git a/vendor/magento/module-customer-graph-ql/Model/GetGuestOrdersByEmail.php b/vendor/magento/module-customer-graph-ql/Model/GetGuestOrdersByEmail.php
index 193ce874fa429..4efcb4f296627 100644
--- a/vendor/magento/module-customer-graph-ql/Model/GetGuestOrdersByEmail.php
+++ b/vendor/magento/module-customer-graph-ql/Model/GetGuestOrdersByEmail.php
@@ -7,7 +7,10 @@

 namespace Magento\CustomerGraphQl\Model;

+use Magento\Customer\Api\Data\CustomerInterface;
+use Magento\Customer\Model\Config\Share;
 use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\App\Config\ScopeConfigInterface;
 use Magento\Sales\Api\OrderRepositoryInterface;
 use Magento\Sales\Api\Data\OrderSearchResultInterface;

@@ -15,31 +18,40 @@ class GetGuestOrdersByEmail
 {
     /**
      * @param OrderRepositoryInterface $orderRepository
+     * @param ScopeConfigInterface $scopeConfig
      * @param SearchCriteriaBuilder $searchCriteriaBuilder
      */
     public function __construct(
         private readonly OrderRepositoryInterface $orderRepository,
-        private SearchCriteriaBuilder $searchCriteriaBuilder
+        private readonly ScopeConfigInterface $scopeConfig,
+        private readonly SearchCriteriaBuilder $searchCriteriaBuilder
     ) {
     }

     /**
      * Retrieve customer orders collection
      *
-     * @param string $email
+     * @param CustomerInterface $customer
      * @return OrderSearchResultInterface
      */
-    public function execute(string $email): OrderSearchResultInterface
+    public function execute(CustomerInterface $customer): OrderSearchResultInterface
     {
-        $this->searchCriteriaBuilder->addFilter(
-            'customer_email',
-            $email,
-            'eq'
-        )->addFilter(
-            'customer_is_guest',
-            1,
-            'eq'
+        $this->searchCriteriaBuilder
+            ->addFilter('customer_email', $customer->getEmail())
+            ->addFilter('customer_is_guest', 1);
+
+        $customerAccountShareScope = (int)$this->scopeConfig->getValue(
+            Share::XML_PATH_CUSTOMER_ACCOUNT_SHARE,
+            ScopeConfigInterface::SCOPE_TYPE_DEFAULT
         );
+
+        if ($customerAccountShareScope === Share::SHARE_WEBSITE) {
+            $this->searchCriteriaBuilder->addFilter(
+                'store_id',
+                $customer->getStoreId()
+            );
+        }
+
         return $this->orderRepository->getList($this->searchCriteriaBuilder->create());
     }
 }
diff --git a/vendor/magento/module-customer-graph-ql/Plugin/Model/MergeGuestOrder.php b/vendor/magento/module-customer-graph-ql/Plugin/Model/MergeGuestOrder.php
index b5d44d5d9c778..fb6558c5d0cf6 100644
--- a/vendor/magento/module-customer-graph-ql/Plugin/Model/MergeGuestOrder.php
+++ b/vendor/magento/module-customer-graph-ql/Plugin/Model/MergeGuestOrder.php
@@ -30,10 +30,12 @@ public function __construct(
      * @param AccountManagement $subject
      * @param CustomerInterface $customer
      * @return CustomerInterface
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function afterCreateAccount(AccountManagement $subject, CustomerInterface $customer)
     {
-        $searchResult = $this->getGuestOrdersByEmail->execute($customer->getEmail());
+        $searchResult = $this->getGuestOrdersByEmail->execute($customer);
         foreach ($searchResult->getItems() as $order) {
             $this->customerAssignment->execute($order, $customer);
         }

