How can I stop auto uploading of managed_file elements?
Try overriding the #attached library on the managed file field:

$form['sitemap'] = [
'#type'              =&gt; 'managed_file',
'#name'              =&gt; 'sitemap',
'#title'             =&gt; t('Upload Site Map (xml)'),
'#upload_location'   =&gt; 's3://private/sitemap',
'#field_suffix'      =&gt; 'XML format supported',
'#upload_validators' =&gt; [
  'file_validate_extensions' =&gt; ['xml'],
],
'#required'          =&gt; TRUE,
'#validated'         =&gt; TRUE,
'#attached'          =&gt; [
   'library' =&gt; [],
 ]  


];