GEM is not part of PATS
GEM controls Cab electrics, wipers, lights, door locks, ect.........but has nothing to do with starting engine or engine electrics
Yes, GEM is programmable for vehicle options, and 1998-2000 it converted speedometer signal for tire size
PATS has 4 parts:
1. PATS key, has embedded RFID tag
2. Transceiver(antenna), it is a metal loop around ignition key cylinder
3. PATS module, this can be separate or built-in to the computer, from 2001 most were in the computer
4. Computer, runs the engine, of course, it needs the "OK" from PATS module to start injectors and fuel pump
If separate PATS Module, then the computer and PATS module are "married" at the factory, so neither can be swapped separately, Ford Dealer must "remarry" one or the other if a swap is needed.
The communications between PATS module and computer is RSA encryption, this means the "OK" is only good one time, each time you turn key on the "OK" code changes, it is a simple fast encryption and unbreakable in "real time".
The "marrying" is the RSA encryption "keys" used in each unit, so they can "talk" to each other.
The transceiver sends out a Radio(RF) wave burst, transmits, with key on, this gives the RFID tag in the PATS key just enough power to transmit its unique number, so no batteries needed in PATS key.
This tag number is sent to PATS module from transceiver, received, hence why the loop is called a "trans-ceiver", it isn't an electronic part, it is just a metal loop antenna.
PATS module checks the number it receives against its list of key numbers that have been programmed in, up to 8 keys can be added at any one time, oldest is dropped from list as new Keys are added, just FYI.
If a match is found PATS module sends the "OK" to start, if no match there is no message to computer, and this is when PATS starts to Flash Theft Light rapidly and a code if available.
I know all this is out there, but you seem to thing something is missing, it isn't.
You could have a loose wire between antenna and PATS module, or failing circuit in PATS module
When any problem is intermittent there is no way anyone can diagnose it firmly as "this is the problem".