Door Ajar error message

I have LFFH21F7HWG upright freezer

I have an error message "Door Ajar"

The door is well closed and the light switch is working fine, turning the light on and off when pushed manually

The door Gasket is very good

The freezer works great the only problem is the beeping error message "Door Ajar"

If I replace the door switch would this fix the problem? Please let me know