Generally it's implemented with a custom URI scheme (that the target application is registered for) or a loopback ip address.
[0] https://developers.google.com/identity/protocols/oauth2/nati...
_The way it does OAuth_, is by opening a google sign in in an embedded browser, and then catching the API key in the redirect by intercepting the navigation in the embedded browser.
It's not a browser session cookie, but it does require the user to log in. To replace this and use the desktop browser, thunderbird would have to spin up a web server, and I'm not sure what restrictions Google have about TLS on redirect targets, which may be problematic to spin up a trusted TLS server on arbitrary end user devices.
They could of course set up a centralised service to echo the token back to end users, but this seems likely to be even higher risk of the service stealing your oauth tokens and less trusted by those types of users still using a desktop email client.