Hi @moniing ,
With Froms and Attachments control as the scenario, the default behavior is list existing files in the Attachments control, there is no way to automatically delete an individual file using functions. That means, users are only allowed to delete a specific file from in the Attachments Control by manually pressing the Cross buttons.
As an alternative, you can update a collection when select an item from Gallery:

Select(Parent);ClearCollect(colAA,ThisItem.Attachments);EditForm(Form3)
then for the Attachments Control, check file names in OnAddFile property, so the App will notify there is file with same name already and need to delete first.

If(Last(DataCardValue17.Attachments).Name in colAA.DisplayName, Notify("Duplicate file found, please remove the original one first", NotificationType.Warning))
Hope this helps.
Best regards,