One option is to use a magnet (on the door) and reed switch (on the frame) and mount the reed switch slightly back from the fully open position. In normal use the reed will pulse just before the door is fully opened and will turn off when actually fully open. You will still have the original problem if the door is stopped on the reed switch.

Depending on the orientation of the switch in your photo, you may be able to design a bump-cam to press the switch as it passes.