If your car on petrol behaves fine, there is no problem with the security system, otherwise do get it checked as @robin indicated.
If the problem is with CNG only, it seems that the CNG solenoid valve has loose ground connection that causes the valve to shut-off during operation. Get your car to a electrician for a troubleshoot.