2001 mustang intermittent problems

I have a 2001 Mustang V6 3.8L. I recently started having trouble where I will be coming to a stop and the engine will shut off but all the electrical will stay on. We thought it was a problem with from the broken O2 sensors but the problem persisted after they were replaced and has actually gotten worse.
Now sometimes the car won’t start at all. When turning the key I can hear the new fuel pump turn on and the engine turns over but it won’t catch. When it does start it can idle for a few minutes before the idling becomes rough and then car shakes some before stalling. The spark plugs and wires are also brand new and when I pull the plugs the distributor seems to be arcing fine.

The idle problem might be caused by a faulty Idle Air Control valve.

https://www.rockauto.com/en/catalog/ford,2001,mustang,3.8l+v6,1372632,fuel+&+air,idle+air+control+(iac)+valve,6072

The IAC valve is what controls the engines idle speed whenever the accelerator isn’t depressed.

One way I check for a bad IAC valve is, while the engine is idling, I take the handle of a screwdriver and rap on the IAC valve.

If the idle speed changes, or the engine stalls, replace the IAC valve.

Tester

Is the check engine light on before the car stalls?

This code came up after hooking up a code reader I got today. It indicates a problem with the exhaust manifold but I don’t know how to conduct any further testing.
(edit) After checking YouTube I have found where the runner control is and I am going to the parts store to get the relevant pieces. Hopefully this solves my no start problem but I will keep the thread updated.

The code indicates that the intake manifold runner actuator is stuck.

Tester

I found that out but wasn’t sure where the runner was as the picture wasn’t of much help to me who is not “car savvy” but YouTube helped me find it. I will keep the thread updated after attempting to fix the problem.