I had the same thought, Miriam
I do the door locks manually, punching the door buttons, so it's possible to lock the door with the keys inside. I don't use the electronic key because my hood switch is slightly out of adjustment, I'm too frugal to go to the Ford place where they have the special test box (it alarms if it's too far up OR too far down) and I'm too lazy so far to use a meter on it.
What I do, because it seems to be that as I get older, I lock myself out of the truck more often, is carry a spare (flat) key in my wallet, and follow a RIGID rule that the key goes back in my wallet as soon as it has been turned in the lock, plus the wallet goes back in my pocket before I open the door. So far, I haven't let both my keys and wallet in the truck, but sooner or later it will happen, so I will put another key somewhere...
It won't be in one of those magnetic boxes, because I have already lost one from my previous truck, bouncing around on back roads I guess.