Old chinese problem, sumtinwong with window or mechanism hitting door mechanism.
Best remove door trim and inspect as window go up and down.
Glass has probably seperated from the metal track that the regulator arms run along. This allows the glass to move out of its normal path of travel and hit the rod that actuates the door latch.
Most places will sell you new glass, I just sikaflexed my glass back into the metal track, been fine ever since.
Silver Certified.