I did what you suggested and I was able to pull that vertical part of the run back up to the top. I understand it's a temporary fix, but it certainly is better than how it was previously.What is still there used to be glued to the horizontal rubber/seal at the top of the glass. One name for these is "window runs".
You can roll that window down and then pull the top end of the vertical piece out from the door frame a little then pull the run up while rolling the window back up. That will cause the seal to slide back up in place. For a temporary fix, push the seal back into place, align it neatly and then roll the window all the way up. It will be much more quiet until you roll that window down again and you should be able to eliminate the gap in the top corner.
For a longer lasting fix clean as needed then glue the seal back together at the top corner. Super glue, weatherstrip adhesive/cement or "goop" may be options. Ideally you just glue the seal pieces together and you can remove them partially from the frame to add tape/etc. to the outer/frame edge. You can also glue just that corner to the window frame for an inch or two to help it stay in place without making it hard to remove/replace in the future. Keep in mind this is a hack and you'll want to get all of the glue out if/when you replace the run so don't overdo it or use something impossible to remove.
Removing all of your window runs and cleaning them out can help them work better but the rubber has hardened so new ones will be much better than cleaned. Some folks try lubricating the old runs with silicone grease/similar.
The best fix is to replace all of your window runs. They will slide in/out with the same tricks you used to fix this one so replacement requires no tools and just a few minutes of work.