My car was doing this all the time esp. on the driver's side until I discovered how to stop it. I brought the issue up with dealer service and they were of no help. They said, "We must have worked that window up and down a hundred times Mr. Mechanical Know Nothing and it did not malfunction once. Oh, that's real nice.
When the windows are down, press on the down buttons again and you may hear a thud, the windows do not malfunction as long as I do this.