Very weird...
After some other tests, I did not find why it's working, but it is !

It was not working until I added WiFi.setHostname() before begin(), but it is still working after commenting it...

WiFi.mode(WIFI_STA);

//WiFi.setHostname("Atom-1");

WiFi.begin(ssid,password);