Set permanent status for managed_file in theme settings
I think you just need to adjust your submission handler; don't include the fieldset "options_settings". I use the getValue() method and pass it an array of values, the form key and the index of its value.

  if ($file_id = $form_state-&gt;getValue(['header_background', '0'])) {
    $file = \Drupal::entityTypeManager()-&gt;getStorage('file')-&gt;load($file_id);
    $file-&gt;setPermanent();
    $file-&gt;save();
  }