diff --git a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
index d8e71fa7e0..4df6afe89a 100644
--- a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
+++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
@@ -198,6 +198,7 @@ public function calculateDependencies() {
     parent::calculateDependencies();
 
     foreach ($this->getSections() as $delta => $section) {
+      $this->calculatePluginDependencies($section->getLayout());
       foreach ($section->getComponents() as $uuid => $component) {
         $this->calculatePluginDependencies($component->getPlugin());
       }
@@ -212,17 +213,28 @@ public function calculateDependencies() {
   public function onDependencyRemoval(array $dependencies) {
     $changed = parent::onDependencyRemoval($dependencies);
 
-    // Loop through all components and determine if the removed dependencies are
-    // used by their plugins.
+    // Loop through all sections and determine if the removed dependencies are
+    // used by their layout plugins.
     foreach ($this->getSections() as $delta => $section) {
-      foreach ($section->getComponents() as $uuid => $component) {
-        $plugin_dependencies = $this->getPluginDependencies($component->getPlugin());
-        $component_removed_dependencies = $this->getPluginRemovedDependencies($plugin_dependencies, $dependencies);
-        if ($component_removed_dependencies) {
-          // @todo Allow the plugins to react to their dependency removal in
-          //   https://www.drupal.org/project/drupal/issues/2579743.
-          $section->removeComponent($uuid);
-          $changed = TRUE;
+      $layout_dependencies = $this->getPluginDependencies($section->getLayout());
+      $layout_removed_dependencies = $this->getPluginRemovedDependencies($layout_dependencies, $dependencies);
+      if ($layout_removed_dependencies) {
+        // @todo Allow the plugins to react to their dependency removal in
+        //   https://www.drupal.org/project/drupal/issues/2579743.
+        $this->removeSection($delta);
+        $changed = TRUE;
+      }
+      // If the section is not removed, loop through all components.
+      else {
+        foreach ($section->getComponents() as $uuid => $component) {
+          $plugin_dependencies = $this->getPluginDependencies($component->getPlugin());
+          $component_removed_dependencies = $this->getPluginRemovedDependencies($plugin_dependencies, $dependencies);
+          if ($component_removed_dependencies) {
+            // @todo Allow the plugins to react to their dependency removal in
+            //   https://www.drupal.org/project/drupal/issues/2579743.
+            $section->removeComponent($uuid);
+            $changed = TRUE;
+          }
         }
       }
     }
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
index d14007aadf..4dc9a85d0d 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
@@ -16,6 +16,7 @@ class LayoutBuilderTest extends BrowserTestBase {
    */
   public static $modules = [
     'layout_builder',
+    'layout_test',
     'block',
     'node',
   ];
@@ -205,9 +206,26 @@ public function testPluginDependencies() {
     $page->fillField('label', 'My Menu');
     $page->fillField('id', 'mymenu');
     $page->pressButton('Save');
+    $this->drupalGet('admin/structure/menu/add');
+    $page->fillField('label', 'My Menu');
+    $page->fillField('id', 'myothermenu');
+    $page->pressButton('Save');
+
+    $this->drupalGet('admin/structure/types/manage/bundle_with_section_field/display-layout/default');
+    $assert_session->linkExists('Add Section');
+    $this->clickLink('Add Section');
+    $assert_session->linkExists('Layout plugin (with dependencies)');
+    $this->clickLink('Layout plugin (with dependencies)');
+    $assert_session->elementExists('css', '.layout--layout-test-dependencies-plugin');
+    $assert_session->elementExists('css', '.field--name-body');
+    $assert_session->linkExists('Save Layout');
+    $this->clickLink('Save Layout');
+    $this->drupalPostForm('admin/structure/menu/manage/myothermenu/delete', [], 'Delete');
+    $this->drupalGet('admin/structure/types/manage/bundle_with_section_field/display-layout/default');
+    $assert_session->elementNotExists('css', '.layout--layout-test-dependencies-plugin');
+    $assert_session->elementExists('css', '.field--name-body');
 
     // Add a menu block.
-    $this->drupalGet('admin/structure/types/manage/bundle_with_section_field/display-layout/default');
     $assert_session->linkExists('Add Block');
     $this->clickLink('Add Block');
     $assert_session->linkExists('My Menu');
diff --git a/core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php b/core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php
new file mode 100644
index 0000000000..0aad55a36c
--- /dev/null
+++ b/core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Drupal\layout_test\Plugin\Layout;
+
+use Drupal\Component\Plugin\DependentPluginInterface;
+use Drupal\Core\Layout\LayoutDefault;
+
+/**
+ * Provides a plugin that contains config dependencies.
+ *
+ * @Layout(
+ *   id = "layout_test_dependencies_plugin",
+ *   label = @Translation("Layout plugin (with dependencies)"),
+ *   category = @Translation("Layout test"),
+ *   description = @Translation("Test layout"),
+ *   regions = {
+ *     "main" = {
+ *       "label" = @Translation("Main Region")
+ *     }
+ *   }
+ * )
+ */
+class LayoutTestDependenciesPlugin extends LayoutDefault implements DependentPluginInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function calculateDependencies() {
+    $dependencies = [];
+    $dependencies['config'][] = 'system.menu.myothermenu';
+    return $dependencies;
+  }
+
+}
