The front passenger glass of my Golf Mk 7 rattles just once when I close the passenger door - but only if the glass is not at the fully uppermost position. I also need to close the door (very) slightly harder, to get it to close fully properly.

These issues occurred only after the glass was smashed by a brick. The point of impact was near the top of the glass. So glass fragments went into the cabin. It seems that this caused a pivoting effect on the glass. That is, the bottom of the glass came outwards and the caused a slight outward fold in the horizontal metal trim visible on the outside of the door.

A body shop replaced the glass promptly and appears to have fixed all visible distortions on the outside of the door. However the issues remain. What could I try next to fix the issues ?