Serial.flush() does not work?

okay, just to make shure that I understood it right (I'm not a native english): "flush" does not mean to empty (clear) the serial input buffer.
"flush" blocks ??? I've not really understood which data are blocked.

But how to empty (clear) the seriell input buffer?

Your second remark:
the serial monitor indeed shows the text "LED is on" and that is for me the reason to assume that the buffer is not empty