diff --git a/src/EventSubscriber/LayoutBuilderIdsConfigureBlock.php b/src/EventSubscriber/LayoutBuilderIdsConfigureBlock.php
index d33f78f62e6a8cee1b10e1c728e3a9ce44bfd1a5..20ef5b86e94750e1770a545cb66826730163aeb7 100644
--- a/src/EventSubscriber/LayoutBuilderIdsConfigureBlock.php
+++ b/src/EventSubscriber/LayoutBuilderIdsConfigureBlock.php
@@ -57,7 +57,8 @@ class LayoutBuilderIdsConfigureBlock implements EventSubscriberInterface {
     ) {
 
       // Pull out the layout_builder_id from config.
-      $layout_builder_id = $event->getFormState()->getFormObject()->getCurrentComponent()->get('layout_builder_id');
+      $layout_builder_id = $form['#form_id'] === 'layout_builder_update_block'
+          ? $event->getFormState()->getFormObject()->getCurrentComponent()->get('layout_builder_id') : NULL;
 
       // Add the section id to the configure form.
       $form['settings']['layout_builder_id'] = [