Like with many of today’s vehicles the possibilities of what the root problem is are many. As for the fuel filter; it never hurts to replace it (under the vehicle) but I don’t think that will be the problem? At Idle the engine is USUALLY using the least amount of fuel; putting it in gear doesn’t require a mentionable amount of extra fuel.
Things that come to mind are the idle air control system, mass air flow circuit or the gear range sensor circuit?
The gear range circuit tells the computer that you’re shifting from park into a gear. Once the computer sees this it will or is suppose too adjust the idle to compensate for the extra load on the engine.
You may need to have the engine performance system scanned; not to just retrieve codes, but to analyze sensor input data and the computer's response to input data.
Dan.
Canadian "EH"