GitLens shows the following dialog whenever I open a new Codespace:

Suggest to use the new API context.globalState.setKeysForSync so that my choice is remembered across different Codespaces.
The follow-up problem is when I select "Allow" in the dialog, then I have to do a auth flow in GitHub, but I'm already logged into GitHub.