Hello my 2009 toyota corolla runs choppy in gear but runs good in parked

I have a 2009 Toyota corolla the runs choppy in gear rpm goes up and down when i turn on the ac and headlight it runs a little better but still a little choppy i have done many things to it changed the PCV valve spark plugs clean the fuel injectors change the throttled body as well as a idle relearn checked all coil packs airflow sensor as well. Took it to a Toyota dealership they said they cant find the issue they said.it also doesn’t give out any engine codes as well

I have no idea what els it can be if you have any ideas let me know thanks

Define “choppy”

Turning AC and/or headlights on puts drivetrain computer in idle-up mode. Done to prevent stalling at idle, b/c those function place an add’l load on the engine. Corollas like mine (90’s era) use an idle-up selenoid, but yours I’m guessing uses throttle body control. So you might have a sticking throttle body. More serious engine problems can cause this as well, timing chain problems for example. Might need to ask shop to assess the entire engine timing situation, including valve timing.

My top of the head guess is a vacuum leak but I don’t understand why there’s no code. As a fellow '09 Corolla owner I can tell you if you had a bad coil you’d know it.

I would check the wire going to your pedal sensor. If it’s been stretched it’s not making constant connection and when you drive it and press on the gas that’s when the connection is intermittent causing it to run as you would put it “choppy” And when the pedal is not engaged the wire keeps its connection and the car runs fine.

a faulty spark plug, clogged fuel injectors, or a faulty ignition coil.

Engine misfires happen when one of the cylinders does not produce sufficient spark or compression and lack of fuel.