On mobile (Android) I clicked on the Log in with GitHub button by mistake. Then I clicked the back button on the phone to get back to the Stack Overflow login page. On entering the userid/password and hitting the Log in button, it took me to the GitHub login page again. Now to login properly when we comeback to the Stack Overflow login page from the GitHub login page by using back button on the phone, I clicked on the 'Log in' button on the upper right corner of the Stack Overflow screen. Now I was logged in properly after going through the CAPTCHA page.
On desktop PC it works fine, i.e., when coming back to the Stack Overflow login page from the GitHub login page by hitting browser back button, the login works properly on entering userid/password and hitting login button, it does not keep sending to GitHub login page as happening on Android.
For reference, my Chrome version is 94.0.4606.61.