Check your fuel pressure with a gauge before the fuel rail. I had the same problem. Chased the codes with new O2 sensor and all. It wasnt until I detected low fuel pressure was the culprit.
joe
Put a fuel pressure gauge on it and watch the fuel pressure as you cut. I had one that had good fuel pressure cold but as it heated up the fuel pressure dropped to a point that kills the engine. Worth a try.
joe