Hello, I'm not particulary a Sunny specialist but did you check for current on the ignition coil when the ignition switch is on? Most cars and almost all Japanese have a ballast resistor at the ignition coil that is bypassed during cranking. So when cranking you have voltage at the coil and the engine starts running. Releasing the key from the start position to ignition position there's no bypass anymore, no voltage at the ignition coil and the engine stops. When there's a faulty ballast resistor of a bad wire around the resistor the symptoms you have can happen.
Jeroen