Engine stops when going out of D

My W220 S 320 CDI (OM648) starts acting up... It didn't run for about a year, but it currently runs very smooth, no issues whatsoever. Had an EPC light at first for gear selector and turbo wastegate but I cleared them and they didn't come back (probably from sitting so long).
Problems started happening today, when I stopped the car and put it out of D, the engine instantly shut off as if I had pressed the Engine On/Off button, which I did not. Happened 3 more times today.
The idle is perfect, purrs like a kitten, engine makes its power, no gearbox issues, nothing.
What do you think it could be? Water seeping in the Keyless Go button when cleaning causing it to short? Or worse electrical issue?
Thank you very much








