When the engine running after the engine shut-off key is pulled out, it means that there is a problem with the timing sensor.
Check whether the timing sensor is attached properly to the crankshaft. Look for damages on the cable.
If cables and connectors look fine, it's necessary to replace the timing sensor.