Single failed registration prevents future successful attempts

I have a custom registration page that includes a field to determine the group the user will be registered with. The page works as expected when correct values are given on the first registration attempt. The problem is that on a failed registration due to an invalid group, any subsequent attempts to register will fail due to that initial invalid group input, even after correcting it.

e.g. Attempt to register with a valid email and password, with the group field empty → registration fails → enter a valid group and click register again → registration still fails

The POST request to keycloak contains the correct information from the most recent registration attempt, but still fails.
Also of note, after a second failed registration the register form reloads with the values used in the first failed registration attempt even if they had been modified in subsequent attempts.

Is there a way to disable this memory of the first values entered in the form or to change them to the newest value submitted?