1) Publish the hosted feature service without enabling attachments.
2) Browse to Portal for ArcGIS > My Content.
3) Navigate to the Details page of the hosted feature service.
4) Under the Layers heading, click the drop-down arrow next to the feature layer.
5) Click Enable Attachments.
This workaround might not work in all cases.