Adding ThirdPartySetting to webform entity results in wrong module dependency I added my ThirdPartySetting to webform element like this:
Added my config schema to file config/schema/mymodule.schema.yml like this:
webform.settings.third_party.mymodule:
  type: mapping
  label: 'Webform mymodule configuration'
  mapping:
    settings:
      type: mapping
      label: 'mymodule settings'
      mapping:
        email_element:
          type: string
          label: 'E-mail element'

and then in mymodule.module I've altered webform settings form like this:
function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id === 'webform_settings_form') {
    $entity = $form_state-&gt;getFormObject()-&gt;getEntity();
    $elements = $entity-&gt;getElementsInitializedAndFlattened();
    $options = [];
    foreach ($elements as $element_name =&gt; $element) {
      $options[$element_name] = $element['#title'];
    }
    $form['third_party_settings']['email_element'] = [
      '#type' =&gt; 'details',
      '#title' =&gt; t('E-mail element'),
      '#open' =&gt; TRUE,
    ];
    $form['third_party_settings']['email_element']['email_element'] = [
      '#type' =&gt; 'select',
      '#options' =&gt; $options,
      '#title' =&gt; t('E-mail element'),
      '#default_value' =&gt; $entity-&gt;getThirdPartySetting('mymodule', 'email_element'),
    ];
    $form['actions']['submit']['#submit'][] = '_mymodule_form_submit';
  }
}

function _mymodule_form_submit(&amp;$form, FormStateInterface $form_state) {
  /** @var \Drupal\webform\WebformInterface $entity */
  if ($entity = $form_state-&gt;getFormObject()-&gt;getEntity()) {
    $entity-&gt;setThirdPartySetting('mymodule', 'email_element', $form_state-&gt;getValue(['third_party_settings','email_element','email_element']));
    $entity-&gt;save();
  }
}

This works fine, but when I export my configuration, I see that dummy module has been added to my module dependencies.
 dependencies:
   module:
+    - mymodule
+    - email_element

This also reflects in third_party_settings
+third_party_settings:
+  email_element:
+    email_element: e_mail
+  mymodule:
+    email_element: e_mail

What am I doing wrong?
Please use hook_webform_third_party_settings_form_alter() in mymodule.module and discard the submit handler which should solve that:
use Drupal\Core\Form\FormStateInterface;

/**
 * Implements hook_webform_third_party_settings_form_alter().
 */
function mymodule_webform_third_party_settings_form_alter(&amp;$form, FormStateInterface $form_state) {

  /** @var \Drupal\webform\WebformInterface $webform */
  $webform = $form_state-&gt;getFormObject()-&gt;getEntity();

  // Do stuff.

  $form['third_party_settings']['email_element'] = [
    '#type' =&gt; 'select',
    '#options' =&gt; $options,
    '#title' =&gt; t('E-mail element'),
    '#default_value' =&gt; $webform-&gt;getThirdPartySetting('mymodule', 'email_element'),
  ];

  // Do not add submit handler.
}

Webform's WebformThirdPartySettingsManagerInterface wraps Core's ThirdPartySettingsInterface which is why I think you're seeing that behaviour.