Here's my tips, haven't read others. Tap on door. Sometimes the bushings when they are warn down can work intermittently. I had this issue with my drivers window and it wouldn't go back up. After tapping on door it was enough to get the bushings to contact and roll it back up before I could get a new motor.
Second, this has happened on nearly all my cars. It's a PITA. But my quick fix, was to remove the door panel. Then take the motor off. I would push the window up by hand and tape it in place or secure it with a stick.
You'll need a 7mm socket and that's it! Three screws and your panel lifts off. Be careful of the wiring harness for the door light, tweeter (if you have one), and window switches. You'll also remove the window switch panel and door handle trim & mirror trim pieces. Whole process takes seconds.
If you need to isolate switches or motor, get a 9v battery and rig it up to the motor.
BTW, insider tip, all the motors for the windows are the same. At least on my 2001 Tahoe. Only the regulator is different. I just pull one at the junkyard and use it. Tried to replace bushings but was a bit much for me... that would be cents (dollars?) compared to $5 or so for a used motor at junkyard.