First thing that comes to mind:
Are you closing the roof properly???
Sounds like you either
a) close the roof manually and fail to keep the button pushed until the roof-lamp in the instrument panel is no longer lit...or
b) your automatic roof does not close fully before you grab the roff handle and pull the manual lever.
Both would cause your roof to leak and your windows to react as if the roof isnt closed.
Check this first.
Patently close the roof before tunring it opver to the dealer.
Other suggestions:
I have had the same window-problem on my Boxey (986) and on other cars.
I believe it's the window safety "dont-crush-my-fingers"-function that is at fault.
Usually it takes 10 seconds to fix.
Most auto-windows can be reset by either rolling all the way up or rolling them all the way down AND keeping the button pushed down for 3-5 seconds when the window reaches its bottom/top.
That should reset the window safety function.
Regarding your leaking roofline you either have a faulty rubber lining or the closing mechanism isn't working properly and hence not closing the roof fully.
Check visually to see if there are any holes or cuts in the rubber seal on the A-piller or roof, and then check the closing mechanism.
Hope this helps