Someone have not properly set the door card back on the frame. Better take it apart and try to set the rear section of the window rail back into the correct slot. Find someone to help as the currently wrong placement is holding the edge back to be fitted correctly, so needs two person to fix. You will also find some of the clips on the door card broken, so if you have SeC close by then just drive by and ask for a bag. They are quite cheap, one can buy over the counter.