Just use autocomplete=”new-password” at the confirmation input. And if you choose to generate a new password in the password input, the confirmation input gets filled with the same value instantly. Tested in chrome.
Reference:
- chrome advice
- html standard discussion