Mine used to do that with the passenger side window. The fix is simple and is something that the factory tests for before they leave but they can slip through the cracks (as yours has and mine did).

This is what's wrong... it's the molding in the top or frame of the windshield. I had the same exact problem, but I had the fortune of discovering it the day I went back to the factory for a tour. I mentioned it to my Porsche customer delivery specialist and so he took the car back to the factory line. He called me in 5 min and said, "great news, one of the engineers knows exactly what's wrong, the bad news is it will take about 45min to fix, is that ok?"

He explained that this is something that is common and that they test for at the factory. In my case it did it about every 5 tries, and only when I auto upped the window hence why they missed it during QA. But sometimes it would do it consistently and it only developed on the 2nd day of ownership. For us it was on the passenger side window.

Check when you "roll" the window up, do you rock the button up past the click to have it auto up or do you push and hold? Try rolling the window up by not clicking the up button, just hold it until it stops. If that works then this is certainly what's wrong.

Now, another possibility is that you need to reprogram the stop position of the window. Look on page 29 of your owner's manual for the section in bold titled "Storing end position of the windows". Try this first before telling them about the molding. Essentially what's going on is that the anti-crush protection sensor is pinching the molding, detects that it might have crushed something, like a finger and auto returns to release what ever it might have crushed.

Yeah, I'm so glad I caught this at the factory. When they told me what was wrong I knew it would be a pain in the ass to have it fixed at a dealer in the states... especially since it wasn't 100% repeatable. I'm so sorry for your pain and hope this helps.