This has happen to me twice and I never knew the issue till I tried different combinations.
How to reproduce
While the car is running, lower down driver side window
Open driver side door
Roll up the window
Turn of the car
Try to restart it - It clicks but fails to crank