Honda engine rev

My son has a 1990 Honda Accord EX with 200+K miles. When he puts the automatic transmission in park or neutral the engine lopes from 1200 to 2500 rpm as soon as the engine warms up. It does not rev if he puts the car in drive with a foot on the brake. He’s been all sorts of things from a sensor gone bad to needing a new electronic chip, ad naseum. Any ideas??

Vacuum leak is what I’d put my money on.

Under idle with no load (park or neutral) the engine is free to “bounce”. Under load (in drive with brake) then engine has to work a little to drive the transmission.

Fix the leak, and it should not bounce any more.

My '85 Accord SEi did this when I first got it at 4 years old. Turned out the previous owner left the thermostat out. (I got the dealer to knock $500 off the price for that issue.) Yours might just have a sticky thermostat.