Pretty certain the ECU will know the engine is running because it is getting signals from the CAS.
The ECU has 2 processes for the fuel pump. At IGN ON, the ECU runs the pump for 5 seconds to prime the system with pressurised fuel. Then at IGN START, the ECU turns the pump on full time, and keeps it running as long as the engine is running.
You need to wire the relay so that the ECU pin 18 switches the relay switching circuit to earth. Then, as soon as the IGN is turned off, the pump should stop.