Basically, the immobilizer consists of 3 main units: IFZ immobilizer/ signal receiver module, PSE- pneumatic central locking module and engine control unit.
IFZ unit receives key signals through receiver in the mirror and transponder signal pickup coil around the steering lock. There is a transponder chip in each key fob.
Once the remote is operated, valid signal is picked up and green light is operated in the mirror and PSE module receives command from IFZ to unlock the doors. Once you open the door- PSE turns on interior lights. When the key is inserted, valid transponder signal is picked up by IFZ coil and it gives the engine control unit permission to start.
It seems to me that at the moment we have a problem with PSE control module. It is located on the right side wall of the trunk behind the paneling. I suggest to pull it out to check the plugs and internals for moisture/oxidation. This can cause some of the weird behavior.
Another pre-check would be to remove and resolder overvoltage protection relay. It supplies voltage to many electronic units and is prone to have dry/cold solders inside.
It is located under the bonnet, on the right side next to engine and ABS control units.
Please check these 2 things first, and let me know what you find and if this will solve the issues. I will be glad to help you further with this.