Arduino Pro Mini + ESP-01 power up sequence

I have the Arduino Pro Mini and the ESP-01 connected to USB 5V. I am using LM1117 to regulate 5V to 3.3V for the ESP-01.

I have the Arduino sending AT commands to the ESP-01 to configure the ESP-01 in setup( ).

Some times it works and some times it doesn't.

Same code.

I have noticed that when it doesn't work, I have to physically disconnect then reconnect VCC from the ESP-01 and then push the Reset button on the Arduino.

Not sure what is going on. I am setting up the ESP-01 as an access point.

void setup()
{
   //open serial communication to PC
    Serial.begin(115200);

    delay(2000);    //allow ESP-01 time to boot up

    //open serial communication to ESP-01 module using SoftwareSerial library
    ESP01_serial.begin(9600);

    char cwsapCommand[] = "AT+CWSAP_CUR=\"LED_display\",,1,0";      //command to change SSID


    //set up ESP-01 module
    //send AT commands to ESP-01 to configure it
    //responses are echoed to Serial Monitor
    if (sendToESP01("AT", responseTIME, DEBUG) == true)
    {
        if (sendToESP01("AT+GMR", responseTIME, DEBUG) == true)                                         // get ESP-01 firmware version
        {
            if (sendToESP01("AT+CWMODE_CUR=2", responseTIME, DEBUG) == true)                            // configure as access point
            {
                if (sendToESP01("AT+CIFSR", responseTIME, DEBUG) == true)                               // display ESP-01's IP address and MAC address            
                {
                    if (sendToESP01("AT+CIPMUX=1", responseTIME, DEBUG) == true)                        // configure for multiple connections
                    {   
                        if (sendToESP01("AT+CIPSERVER=0", responseTIME, DEBUG) == true)                 // turn off server
                        {
                            if (sendToESP01("AT+CIPSERVER=1,8080", responseTIME, DEBUG) == true)        // turn on server on port 8080
                            {
                                if (sendToESP01("AT+CWDHCP_CUR=0,1", responseTIME, DEBUG) == true)      // enable DHCP
                                {
                                    if (sendToESP01(cwsapCommand, responseTIME, DEBUG) == true)         // change SSID
                                    { 
                                        commGood = true;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}