The latching slide bar might be obstructed preventing it to travel completely downward.
Possibilities could be a wire, bent at the top or hardware from another part of the machine
The triple pointed lock bar could be bent or need a slight adjustment outward.
First thing to try is to push the door in towards the machine on the right side.
At the same time attempt to lock the machine.
This will give some indication or elimination of what might be happening.
The slide assembly itself might need cleaning.
Big caution, if the lock is disengaged from slide bar at any point. A potential lock out could occur.
For instance the slide bar is inadvertently pushed up and sticks. The door slams shut and down goes the bar.
Something to keep in mind when the lock has been disengaged.