It's a heat thing...had this job a few times recently.
Your locking mechanism is fine, as the handle lifts when the door is open....so the problem is the door has more than likely wilted in the heat.
This in turn makes the mushrooms and rollers on the side of the door, not line up with their counterparts on the door frame.
Have you adjusted the hinges the right way...UPVC hinges often adjust in the opposite direction to what you think.
It helps to wipe a little vaseline across these locking points.Close the door and spray water across it for a few minutes..this will help it shrink back.