Take a look at weather stripping: Thick or weakened climate stripping can prevent limited closure; trim or change as required. Try to find sliding modules or clips that can be repositioned to adjust how much the door travels when opening or closing. The limit switch guarantees the door stops at https://youtu.be/wSkWTAdm-Gg?si=pR5EXdjVuNYjtHN7