I had a 1998 Corvette that the key would not unlock the door when my battery died completely. AAA towed it to the dealer and they put it on a lift and hooked up some power and unlocked the door to get the hood opened, Replaced the battery and everything was fine from then on.
Dealer said the key will only work if there is slight power but not if totally dead like mine was. Door handle is not mechanical but actuated electrically. I'm guessing our Mustangs must be the same way. They probably figure most battery's don't go completely dead but die and leave enough juice to work the opener.
You may have a bad ground or it is loose. The problem with going to someone to fix it is they can fool with it for day's== ($$$$$) and not find the problem.
Try to find a schematic of that part of the wiring to find out how or where that box is grounded.
2012-candy red- V-6 MCA, Automatic Trans. CFM Valve cover breather. MMD blackTail light trim.Magnaflow axle back street mufflers, JLT oil catch can.MMD hood struts.
Airaid Cold Air intake. red caliper covers, 3.7L performance engine cover, Flat black hood spears.Boss 302 strut brace, CDC rear panel, Trunk Cargo net,--Dash carpet cover,
Viser stickers to cover ugly yellow warning crap,Aluminum driveshafft and Swarr Bar.