ESP needs a reboot after wifi OTA flash
You can add ESP.restart() in the following line to make it restart. 

ArduinoOTA.onEnd([]() {
Serial.println("\nEnd");
ESP.restart();
});


Now you can upload code each time without hitting reset.