One of our document libraries has a SharePoint form customised with PowerApps. One of our users regularly has trouble when submitting the form. The form hangs and no submission is registered. When they try again with the same data, the submission often goes through.
They have tried using a different browser but the same problem crops up.

The OnSave property of the SharePointIntegration control has been altered, to work around the fact that the standard implementation does not support creating new items in a document library. Therefore, when the form is launched for item creation, OnSave launches a Power Automate flow to manually create the item.
The run history of the Power Automate flow shows that when the form hangs on submission, the flow never starts. When the form is submitted successfully, the flow does start and run. This implies that the problem is client-side - maybe even browser-based.
What can be done to diagnose and solve the problem?
A simplified version of the OnSave property is below.
If(
frmSharePoint.Mode = frmSharePoint.Mode.New,
//when making a new item, create the item through a flow
If(
frmSharePoint.Valid,
Notify("Created ID is " & CreateRecord.Run().id);
RequestHide(),
//if form is not valid, notify the user
Notify(
"Please ensure all mandatory fields are complete before saving.",
NotificationType.Error
)
),
//when editing an item, submit the SharePoint form contents
SubmitForm(frmSharePoint);
RequestHide()
);