Drupal 8 managed_file removes file without saving the configuration

I am creating a drupal 8 theme. On that theme I have placed a field for uploading banner image. Below is the $form field construction for banner_image field. $form[‘banner’][‘banner_image’] = array( ‘#title’ => t(‘Banner Image’), ‘#type’ => ‘managed_file’, ‘#default_value’ => theme_get_setting(‘banner_image’), ‘#upload_location’ => ‘public://’, ‘#description'[…]