I think the windows on the mk6 Golf have an ‘anti trap, anti pinch’ mechanism, so if an obstruction is detected when the window is being closed, it will go into reverse and lower again. You might have some dirt in the channel in window rubber that the glass slides up and down in that could be causing this. Try cleaning the window rubber channel and see it cures the issue.