Hi @Anonymous ,
Could you tell me
1)Before you click the edit button, what's the form's mode? or maybe it is invisible until you click the button?
2)When will the edit button appear? Do you want it appears just when you edit the form? Will the button appear when you view form and create new record?
I assume that
1)Before you click the edit button, the form is invisible. If you click the edit button, the form becomes visible and mode is edit.
2)The edit button only appears when you edit the form.
Based on your description, I've made a similar test for your reference:
1)customize the form in PowerApps
2)Set FormScreen1's OnVisible:
If(SharePointForm1.DisplayMode=DisplayMode.Edit,Set(var,true))
3)Set edit button's Visible: var
Set edit button's OnSelect:
Set(var,false) //use a variable to change the button's visible
4)Set SharePointForm1's Visible:
If(Button1.Visible=true,false,true)

Please note that Visible is an input property, you could not set it outside.
Then, when you edit a record, firstly it only appears en edit button , if you click the button, the edit form will appear.
Best reagrds,