If the ESP8266 is set to autoconnect, which it probably is, only ever call WiFi.begin once. Not once per boot up but once to store the WiFi credentials then never again not even after rebooting. It will connect in the background and also reconnect if the WiFi disappears and comes back. See https://github.com/kentaylor/WiFiManager/ for a more thorough explanation.
If the ESP8266 is set to autoconnect, which it probably is, only ever call WiFi.begin once. Not once per boot up but once to store the WiFi credentials then never again not even after rebooting. It will connect in the background and also reconnect if the WiFi disappears and comes back. See https://github.com/kentaylor/WiFiManager/ for a more thorough explanation.