Thank you for finding this! It appears to be a bug, great catch.
I was able to reproduce the behavior from your steps and it looks like both 'cancel' and 'ok' in the pop up lead to the same result or having two groups new with no users in them.
For now we would like to prescribe to all users to not click the "+ New" button on the top left while trying to add users to a group or else it will override the currently unsaved members that they have been added
I will be writing up a ticket for our engineering team to check this out and will keep you posted!