In case it helps....
It varies for different cars, but the radio usually uses either an ignition sense line or an accessory line (often dual-labelled on audio pin-outs just to confuse!). Ignition sense stays on during cranking, but accessory might not.
For instance, Fords like the Focus use the accesory line which will drop to zero while the key is in the crank position and it will come up again when the key springs back to RUN/IGN. There is no ignition sense at the radio connector.
Also for example, VW/Skodas do not usually drop the accessory line during cranking.
I do not know about BMWs off-hand but I'll have a look
Perhaps delay the empeg turn-off for a few seconds to be sure the accessory line going down means turning the car off? Same way as you notice some radios don't turn off right away when you key off the car.
Nick