This is actually not so hard......
If you have a fuel-injected bike,
that you probably have a fuel pump.
If you have a fuel pump, than when
you shut off the pump, fuel stops flowing.
If you shut off the engine, and the fuel pump
also shuts off, that's usually all you need.