I hope someone has an answer for this.
I own 87 U.S. spec M6 with less than 101,000 miles.

The engine stalls but only once a day for a few minutes. It happens when the engine is started from dead cold.
It starts without hesitation until temp gauge needle pass the blue zone to ¼. Once reached to ¼ to ½, either engine stalls without any warning, or during the acceleration, it stalls like either no sparks or fuel.
Restarting the engine is no problem, but during acceleration it may stalls again.
But strangely once temp gauge needle drops to ¼ or a few minutes of unstable time, the engine never stalls unless it sits over 8 hours or more.
I have replaced a coolant temp sensor, but no changes. I don’t think AC valve or TP sensor are causing this because it happens only once in short time.

The ECU was wet with rain leaked from the windshield gasket.

I think it is caused by either its air flow meter or the ECU.

Any suggestions are welcome.