I did think why don't they have a sensor to say the flap isn't closed ??

.
This question has been asked on a number of occasions TBH.
I have been lucky enough not to drive away with the charge flap left open on our ZS EV Gen2 (yet).
But I did leave it open on a couple of occasions in our previous ZS EV Gen1 model, both times after using a public charging post !.
Our home wall box has a tethered cable, so I have got into the habit of unlocking the car with the fob to release the cable, then returning it straight away to the wall box.
When using a untethered public charger, I would release the cable with the fob, then coil up the cable and return it straight to the boot.
Then I would jump into the car and drive off with the charge flap still wide open - Dooh

!.
Our previous VW PHEV had a warning light on the dash, to warn if the charge flap was still open.
Strangely enough, it would report to say "Hatchback Open".
The first time this happened, I thought the actual hatch back itself was incorrectly closed.
So, I stopped the car and opened the hatch and closed it again firmly !.
Returned to the car and it still had the warning showing on the dash ?

.
Went around to the front of the car to find that the charge flap was slightly open.
Closed it firmly and the warning light had then gone out

.
Having the warning light was a great idea, but the warning message text got lost in the translation process from German to English I think

.