When exporting file from the view layer, set the hosted feature layer view definition first. Verify it by checking the JSON view layer. Refer to the following:
"viewDefinitionQuery" : "...'",
"definitionQuery" : "...'"
For more information, refer to the following documentation:
https://doc.arcgis.com/en/arcgis-online/manage-data/set-view-definition.htm