diff --git a/vendor/magento/module-page-builder/Model/Stage/Preview.php b/vendor/magento/module-page-builder/Model/Stage/Preview.php
index 7a3619ad80..5867d598e5 100644
--- a/vendor/magento/module-page-builder/Model/Stage/Preview.php
+++ b/vendor/magento/module-page-builder/Model/Stage/Preview.php
@@ -108,27 +108,26 @@ public function startPreviewMode($callback, $storeId = null)
         }
         $this->emulation->startEnvironmentEmulation($storeId);
 
-        return $this->appState->emulateAreaCode(
-            $this->getPreviewArea(),
-            function () use ($callback) {
-                $themeId = $this->scopeConfig->getValue(
-                    'design/theme/theme_id',
-                    ScopeInterface::SCOPE_STORE
-                );
-                $theme = $this->themeProvider->getThemeById($themeId);
-                $this->design->setDesignTheme($theme, $this->getPreviewArea());
-
-                try {
-                    $result = $callback();
-                } catch (\Exception $e) {
-                    $this->isPreview = false;
-                    throw $e;
+        try {
+            return $this->appState->emulateAreaCode(
+                $this->getPreviewArea(),
+                function () use ($callback) {
+                    $themeId = $this->scopeConfig->getValue(
+                        'design/theme/theme_id',
+                        ScopeInterface::SCOPE_STORE
+                    );
+                    $theme = $this->themeProvider->getThemeById($themeId);
+                    $this->design->setDesignTheme($theme, $this->getPreviewArea());
+
+                    return $callback();
                 }
-
-                $this->emulation->stopEnvironmentEmulation();
-                return $result;
-            }
-        );
+            );
+        } catch (\Exception $e) {
+            $this->isPreview = false;
+            throw $e;
+        } finally {
+            $this->emulation->stopEnvironmentEmulation();
+        }
     }
 
     /**
