With Xpath you can add order if you need a certain element with the same attributes. In this case, of course as a pseudocode it would be like this:
"//form[0]/button"
This will only select the button in the first <form> element
<form>