When I had the situation you are describing, (which I discovered trouble shooting my gas flap not locking).
It turned out to be the immobilizer board had gotten web and died.
My solution was to pull ECU and imobilizer, sent them off to these guys;
https://www.ecudoctors.com/
Wasn't cheap, however reasonable compared to other options.
David