I managed to solve the issue in question by myself. I'm writing this information down in case anyone in the future stumbles upon this problem too.
What I had to do, inside SourceTree account settings, is authenticate my GitHub account not through "OAuth", as I did before, but using "Personal Access Token". The SourceTree app then asked me to login and put my PAT as a password. I generated my PAT through this link: https://github.com/settings/tokens. I checked all boxes while creating the token and made it so it never expires, despite GitHub suggesting me not to (note that I'm merely saying what I did in order to make it work for me; don't take this information as advice on what should be done in general under these circumstances).
Hope this is useful to anyone.