diff --git a/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php b/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php
index 22459b1e93..48f6930d83 100644
--- a/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php
+++ b/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php
@@ -376,6 +376,12 @@ public function getProvidedElements(array $plugin_ids = [], ?EditorInterface $ed
         if ($id === 'ckeditor5_sourceEditing') {
           $defined_elements = !isset($editor) ? [] : $this->getPlugin($id, $editor)->getElementsSubset();
         }
+        // ckeditor5_style is an edge case too: in its definition it declares
+        // that allows any HTML tag with the class attribute but it only allows
+        // those specific classes that are configured.
+        elseif ($id === 'ckeditor5_style' && !isset($editor)) {
+          $defined_elements = [];
+        }
         // The default case: all other plugins that implement this interface are
         // explicitly checked for compliance: only subsets are allowed. This is
         // essential for \Drupal\ckeditor5\SmartDefaultSettings to be able to
