ESP8266 / Arduino: connx fails to router after restart

Hi,
Although my esp8266 Wifi server usually works well, sometimes (e.g., overnight) it probably loses the connection to my WiFi router, and when I look at the TFT screen, I see that it is stuck in the setup routine trying to log / sign up, but it fails (display progress between 80 and 98%):

#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
WiFiServer   wifiserver(http_port);
ESP8266WebServer lanserver(8081);

void setup() {
  //  

  WiFi.begin(ssid, password);
  WiFi.config(this_ip, gateway, subnet);   // static IP  (x.x.x.200)

  while (WiFi.status() != WL_CONNECTED) {    // <<<<<<<<<<<<<<<<<<<<<<<<
    delay(500);
    Serial.print(".");

    display.clearDisplay();
    display.setCursor( 0, 20);  display.print("WiFi connecting...");
    drawHorizontalBargraph( 0, 30, (int16_t) display.width(), 9, 1, progress);     // <<<<<<<<<<<<<<<<<<<<<<<<
    display.setCursor( 0, 40);  display.print((String)progress + "%");         
    if (progress >= 98) {
      progress = 80;
      Serial.println();
    }
    display.display();

    if (progress < 10) progress += 5;
    else if (progress < 50) progress += 2;
    else if (progress < 90) progress += 1;
  }
  display.clearDisplay();
  progress = 100;
  display.setCursor( 0, 20);  display.print("WiFi connecting...");
  drawHorizontalBargraph( 0, 30, (int16_t) display.width(), 9, 1, progress);
  display.setCursor( 0, 40);  display.print((String)progress + "%");
  display.display();
  delay(300);

  Serial.println("");
  Serial.print("WiFi connected: ");
  Serial.println(WiFi.gatewayIP());


  //----------------------------------------
  // Start the WiFi server (-> www)
  wifiserver.begin();
  
  //  

}

Also resetting the esp by reset btn does not work (it starts anew, but hangs up immediately again), probably the static IP (x.x.x.200) on the router is (still) blocked. Only if I briefly, completely unplug the power supply and then re-plug, it works again (immediately, without problems).

The same problem occurs when the ESP is connected via USB cable with my Arduino IDE on the PC and I upload a new version of the program, even then it tries to log in to the router, but is blocked. Again, only a short-term removal of the USB-power cable solves, then everything runs again.

So I probably would have to insert some commands which handle this connection problem with blocked IP after restarting, but how could one do that?