I had a Ford, fuel injected, that had a similar problem. After many dolllars and time, it was the Main computer that controlled the fuel injection.
I hope that is not the solution.
This is like the problem I described earlier. If the engine management computer is losing power by losing the voltage regulator then it cannot store a fault code.