Accord 2004 LX stalls in drive when warm

Accord rpm suffers, goes under 500 when put in R or D, when it’s warm, but when put in P or N revolves around 750 rpm
I cleaned up IAC, throttle body, replaced pcv, a little difference was felt when EGR was unplugged, added seafoam fuel injector cleaner , still the same
There is no CEL
Kindly help if any ideas
Is it the IAC or something else?

2.4 L 4 cylinder or 3.0 L v6 engine?

2.4L 4 cylinder

I would recommend a closer inspection of the fuel pressure regulator. Even though there aren’t any codes, I would check the systems with an advanced scanner. There could be a log with some stored codes. Maybe you can rent one or borrow one from an auto parts store.

The computer adjusts the current to the IAC to set the correct idle rpm. The input factors to the computer affecting idle rpm are brake pedal switch, power steering pressure switch, coolant temp, A/C on or off, transmission in gear vs neutral, alternator charging state. The throttle position sensor is probably another one. So checking to make sure all those are working correctly makes sense. Ignition timing has to be correct also, and the ignition system in good order. Air filter & pcv system also must be in good shape to get a good idle.

The test procedure says to disconnect the evap purge connector, then connect the HDS to the DLC ( which I presume means connect up a scan tool so you can monitor the rpm) . Start engine and idle at 3000 rpm until radiator fan turns on. Then idle rpm should be 700 rpm with m/t, 800 rpm w/automatic in park.

Went to a good auto repair shop they tried diagnosing the vehicle, and could not find anything, ignition/starter switch was bad so they changed that, but car still stalls, they say that code for IAC high rpm p0507 flashed during some of their test and they also did idle relearn and situation is worse since then , now next thing they want to do is change IAC = $300 or throttle body =$900, so I asked why does not it stall in neutral if IAC is bad, he said when in gear IAC gets different signal and stuff from PCM
So I got intermotor IAC for 100 bucks from advance Auto parts , I know I change it because I took the old one out as well for cleaning
But i am still in doubt it’s the IAC or something else…

PS: I changed the pcv to a brand new one, that gave a good click sound on shaking, so that has moved out of the list for fix

Replaced IAC, still stalling when hot.