Arduino stops working when pc turned off

  digitalWrite(LED_WiFi, 1); //flash LED THRICE
  delay(100);
  digitalWrite(LED_WiFi, 0); 
  delay(100);
  digitalWrite(LED_WiFi, 1); 
  delay(100);
  digitalWrite(LED_WiFi, 0); 
  delay(100);
  digitalWrite(LED_WiFi, 1); 
  delay(500); //++++++++  add longer delay so flashes are separated
  digitalWrite(LED_WiFi, 0); //ensure blue LED off

I like to use the small OLED I2C displays for projects.
I pepper the Startup with print statements

your blinking lights works similar.

add a THRICE blink after

initWiFi();
delay(200);

move it down to other functions as you find it works