I have a powerapp newform with SharePoint as the datasource. User can upload documents in NewForm which gets stored in document library successfully. Below is the code for the same.
NewForm Submit Button

ForAll(
DataCardValue11.Attachments As file,
'UAT-UploadtoDocLib'.Run(
{
contentBytes: file.Value,
name: file.Name
},
DataCardValue3.Text,
DataCardValue15.Text
)
);
I tried the same in EditForm, where user can upload additional documents. Sample2 and Sample3 are the new docs attached in EditForm.

EditForm Submit Button
ForAll(
DataCardValue11_2.Attachments As file1,
'UAT-UploadtoDocLib'.Run(
{
contentBytes: file1.Value,
name: file1.Name
},
DataCardValue3_2.Text,
DataCardValue16.Text
)
);
Sample2 an Sample3 gets uploaded in document library, however it takes lot of time. I need to wait for 2 minutes for the form to be submitted. Documents are very minimal in size as well not even 1 MB. Also, i face below error once flow ran.

May i know how to avoid this? There is no network issue or internet connection as highlighted in above error. It happens for all users.