05 Subaru 2.5i dies after starting

My 2005 Subaru Outback 2.5i wagon will start but immediately dies. There is no noise associated with it dying out, just quietly gives out. This happened in December and after paying for a tow truck and the mechanic all they could tell me was that I have a great car and they couldn’t find a cause. They said that the only thing it might have been was a loose connection to the battery. The mechanic cleaned the battery and reinforced one of the connections but was uncertain that was even the issue. Then fastforward to today and the same thing happened. It started just fine and immediately quit. I seriously cannot come to terms with another mechanic telling me that they cant figure out a cause. Anyone have some input or experience something similiar?

I’m a mechanic and I can’t figure out THE cause, absolutely.

Are you saying the engine starts, stalls, and then cannot be restarted?

If it can be restarted, how soon after the stalling will it start?

If this only happens once every few months it may be very difficult for anyone to diagnose, but the more information you provide the better the chance that someone will have a theory.

Are there any similarities in the weather when this happened, or time of day, or anything else?

It will restart immediately. On both occassions the car died after putting it into reverse. So I had driven for a while and then needed to put the car in reverse when it died out. I shifted it into park and turned the ignition off before restarting, it will always turn over but quietly dies upon restarting.

Thanks so much for your response : )

The computer controls engine idle via the Idle Air Control (IAC) valve. If this valve is dirty or sticking, the idle may drop low enough for the engine to stall.

Does the idle speed ever fluctuate after the engine warms up?