OK, it wasn't clear that you were already aware of the operating principle.
The first thing to consider is what the server itself reports as the effective site URL and absolute path to the site. Please note that the protocol and subdomain matter for the site URL. This is to say that https://www.example.com, https://example.com, http://www.example.com and http://example.com are four different sites as far as the restoration is concerned since there is no way to reliably know if they are served by the same or a different path on your site (and, trust me, I've seen servers which would indeed serve a different site on each of the four URL variants!).
Regarding the site root, thing are easier. If it's a new directory it's a different site.
The other thing to consider is that browsers and third party browser extensions offer form autofill and caching. A browser can very well try to auto-fill your connection information, usually with the wrong information (most likely your login username and password) because the form autofill is very lax about matching credentials with sites. It's also possible that the browser has cached the contents of the form from a previous restoration and autofills them for you without asking. Unfortunately, even though an autofill="off" attribute exists for form fields, browsers are ignoring it since circa 2017 because it was being abused by sites to prevent password autofill in login pages. So, yes, browsers decided to break the specification they created themselves and this non-intuitive behavior is even documented in the Mozilla Development Network!
Finally, if you go back and forth in the restoration interface you will see that the database page's fields are autofilled if you have already filled them in before backtracking to that page or reloading the restoration. This is intentional. You can go back to the first page of the restoration and click the red Start Over button at top of the page to clear the temporary storage used by the restoration script.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!