When changing the default browser, macOS will show a system dialog asking you to confirm the change.
You must click "Use" in that dialog for the change to take effect.
How it works:
The button will toggle between Browser A and Browser B.
The title shows: Current Browser > Next Browser