2002 Hyundai XG350 - Problem

While driving the car slows down and the RPM decreases even when the accelerator is pressed. To correct the problem I have to slow down or change to neutral to let the engine return to the normal running mode or even stop completely and turn the engine off and restart again. The Hyundai dealer changed the sensor-ignition. My engine light is on and the problem was not fixed. I had the car checked at AutoZone and show the error P0350 Ignition coil. I would appreciate your help or suggestions.

Thank you

Well for starters I would consider replacing the Ignition coil. Most are not expensive.