Beyond the issue with certain characters in your username/password (the fix of which should meanwhile have been rolled out to all relevant LibreOffice installations), there is apparently a further (as of yet unaddressed) issue that causes failures for some Google accounts but not for others. See https://github.com/tdf/libcmis/issues/22 “Failure logging into some Google Drive accounts, but not into others” for all the technical details (libcmis is the underlying software that LibreOffice uses to connect to Google Drive).
Again, what is confusing is that, due to how things are coded on the LibreOffice side, a failure to connect (for whatever reason) will typically bring up the 6-digit two-factor authentication dialog, whether or not you are actually using two-factor authentication. So when that dialog comes up when it shouldn’t, that actually means LibreOffice was unable to connect, for unclear reasons.