Just saw this now by accident. Please either mention me with @elBoberido, comment on openrepos or create a bug report on gitlab or these issues might stay unnoticed
You are right, after looking at the code there is indeed a bug and the workaround from @Ahtisilli will work. Literally every strava API call refreshes the token but the upload uses a different mechanism since it does a multipart message. Oh boy, with the benefit of hindsight this should have been so obvious . I tested this quite a lot after the refactoring but the refresh of the token only with the strava activity page and not with an upload and since I do not use strava I did not encounter the issue myself.
There is an update with a fix available