I think this is also an issue with the github app itself whenever an oauth is opened so there's not that much that you can do to fix it entirely.