If you can detect when this is possible, you should add the remote using the ssh url (git@github.com:JacksonKearl/vscode.git) instead of the https url (https://github.com/JacksonKearl/vscode).
I can push to the first but not the second without getting a personal access token because 2FA.