diff --git a/core/modules/layout_builder/src/Controller/AjaxHelperTrait.php b/core/lib/Drupal/Core/Ajax/AjaxHelperTrait.php
similarity index 95%
rename from core/modules/layout_builder/src/Controller/AjaxHelperTrait.php
rename to core/lib/Drupal/Core/Ajax/AjaxHelperTrait.php
index 072eccab35..aacc75d6b8 100644
--- a/core/modules/layout_builder/src/Controller/AjaxHelperTrait.php
+++ b/core/lib/Drupal/Core/Ajax/AjaxHelperTrait.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\layout_builder\Controller;
+namespace Drupal\Core\Ajax;
 
 use Drupal\Core\EventSubscriber\MainContentViewSubscriber;
 
diff --git a/core/modules/layout_builder/src/Controller/AddSectionController.php b/core/modules/layout_builder/src/Controller/AddSectionController.php
index 947895985c..0ea42379a6 100644
--- a/core/modules/layout_builder/src/Controller/AddSectionController.php
+++ b/core/modules/layout_builder/src/Controller/AddSectionController.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\layout_builder\Controller;
 
+use Drupal\Core\Ajax\AjaxHelperTrait;
 use Drupal\Core\DependencyInjection\ClassResolverInterface;
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
 use Drupal\layout_builder\LayoutTempstoreRepositoryInterface;
diff --git a/core/modules/layout_builder/src/Controller/ChooseBlockController.php b/core/modules/layout_builder/src/Controller/ChooseBlockController.php
index 5287be25fc..85ea7d8370 100644
--- a/core/modules/layout_builder/src/Controller/ChooseBlockController.php
+++ b/core/modules/layout_builder/src/Controller/ChooseBlockController.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\layout_builder\Controller;
 
+use Drupal\Core\Ajax\AjaxHelperTrait;
 use Drupal\Core\Block\BlockManagerInterface;
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
 use Drupal\Core\Url;
diff --git a/core/modules/layout_builder/src/Controller/ChooseSectionController.php b/core/modules/layout_builder/src/Controller/ChooseSectionController.php
index a04cdbb1c1..488480883d 100644
--- a/core/modules/layout_builder/src/Controller/ChooseSectionController.php
+++ b/core/modules/layout_builder/src/Controller/ChooseSectionController.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\layout_builder\Controller;
 
+use Drupal\Core\Ajax\AjaxHelperTrait;
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
 use Drupal\Core\Layout\LayoutPluginManagerInterface;
 use Drupal\Core\Plugin\PluginFormInterface;
diff --git a/core/modules/layout_builder/src/Form/AjaxFormHelperTrait.php b/core/modules/layout_builder/src/Form/AjaxFormHelperTrait.php
index a5a387020f..9f6e695b80 100644
--- a/core/modules/layout_builder/src/Form/AjaxFormHelperTrait.php
+++ b/core/modules/layout_builder/src/Form/AjaxFormHelperTrait.php
@@ -5,7 +5,7 @@
 use Drupal\Core\Ajax\AjaxResponse;
 use Drupal\Core\Ajax\ReplaceCommand;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\layout_builder\Controller\AjaxHelperTrait;
+use Drupal\Core\Ajax\AjaxHelperTrait;
 
 /**
  * Provides a helper to for submitting an AJAX form.
