code: private function _updateSettingsForTheme(array &$settings, ?ThemeInterface $theme): void
      {
          $themeDomain = (new SettingDomain())->setName('theme')->setEnabled(true)->setReadOnly(true);
          $themeIdTag  = (new SettingTag())->setName($theme->getIdentifier());
  
          /** @var Setting $setting */
          foreach ($settings as $setting) {
              // Set default domain to `theme`
              $setting->setDomain($themeDomain);
              if ($theme instanceof ThemeInterface) {
                  $setting->getTags()->add($themeIdTag);
              }
          }
      }
docs: Override SettingModel values to be matched as a theme settings.
  A theme setting is defined by:
  - domain = theme
  - tags contain the theme name
  
  @param array               $settings
  @param ThemeInterface|null $theme
  
  @return void