Don't forget that EVERY body panel that opens on the Ford GT is connected to the door ajar light. Yes, that means the engine cover and the cargo cover.
Like many owners, I've spent several minutes slamming and re-slamming the side doors before realizing the front or rear hatch was not fully seated down.
My advice, make sure the cargo and engine covers are fully shut. Both have to be closed with a healthy push. I hate to use the word "slam" but when I close my engine cover I'm pushing pretty hard and I always push right up until it hits the latches (no letting off early and expecting momentum to finish the job). For the cargo cover I usually just let it drop from about a foot above the latch and that does the trick. I can guarantee you this -- if you're babying either panel they won't be fully closed.
In the past I've had the door ajar light show "all secure" when first driving away (after shutting everything) and then it comes on a few, or even several, miles later. But it never happens now that I follow the above shutting procedures.
Hope this is your problem. Hard for me to believe there's an actual "malfunction" involved here.