According to your description, do you mean you cannot leave this upload page when you upload files in Teams channel?
As a workaround, you could try to visit the SharePoint Online Site and upload the file to see if this issue can be reproduced.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.