2005 Ford Escape door ajar circuit issues

I believe it’s a software bug that was never resolved for the Escape. I replaced 4 of the door latches and the hood latch, one at a time and the problem would go away for about a month then would reappear.
Forget about spraying WD-40 inside the door latch. It’s a logic problem with the PATS system. You can reset the logic by disconnecting the battery but then you’ll have to reprogram your radio stations and clock. You can reset PATS with the ignition key (much easier) by locking all doors from the driver’s side interior door panel. 2. Now close the driver’s side door, the headlights may or may not flash when you close the door. In my case the headlights didn’t flash because the logic was lost so the horn would go off all by itself 20 minutes after you walk away. 3. After locking the car use the key in the driver’s door and turn it to the left once. This will unlock the driver’s door. Then turn it to the left again unlocking all doors. Then continue to turn it to the left 4 more times and you will hear the solenoid unlatch each time. This will reset the logic in the ECU and now you can open the door and hit the master lock and when you close the door again the headlights will flash and the PATS has been reset. When the problem comes back just repeat the reset process.