Oh, I thought if it failed that you would want to try again. In that case, I recommend not using the retry scope for this.
Instead, perform the activity you use to uplload, then after that, ad a Parallel activity. Inside the Parallel activity, add 2 click activities (one for the failure window, and one for success). Set the activities to continue on error. This will ensure that the window is closed.
Keep in mind that by default, you will have to wait for the opposite activity to complete, so this will take the duration of the timeout period for the Click activity to complete. You can shorten the timeout period to speed this up.