OK, I have found something …
It seems that you need to use the trigger WiFi.mode(WIFI_AP) of WiFi.mode(WIFI_STA) when connecting. I have never used that before.
When I used this in my code: WiFi.printDiag(Serial) I saw some weird stuff :
Mode: STA+AP
PHY mode: N
Channel: 11
AP id: 0
Status: 5
Auto connect: 1
SSID (9): oostindie
BSSID set: 0
It was connect in STA and AP mode?! Then I cleared the EEPROM part where I save SSID and password. What I saw was more than concerning :
No wifi configuration found, starting in AP mode
SSID:
ESPimatic3
password:
espimatic
Connected to ESPimatic3
IP address: 192.168.4.1
Mode: AP
PHY mode: N
Channel: 1
AP id: 0
Status: 255
Auto connect: 1
SSID (9): oostindie
MY piece of code tells me it has NO SSID or password to connect, so it starts in SoftAP. But it was total aware of my previouse used credentials.
I editted the code to use WiFi.mode() at every place, and the ghost AP is gone now. Will publish in a few minutes.