The processor on the Mayfly isn’t clocked fast enough for reliable two-way communication at 115200. It’s pretty reliable at talking at that speed (ie, to the serial monitor), but when listening at that speed, it drops and garbles too many characters to be usable.
I don’t know why you had problems compiling the sketch. It compiles and runs for me with both debugging definitions.
The reason initialization is failing is the baud rate. I wrote that example for someone with a new ESP32 bee. In the example, the baud for the modem is first set at 115200, which is what an ESP32 will use at factory defaults. The modem is woken, and the communication is tested at the set baud; if (when) that fails, it tries to reset the baud rate to 9600 and then saves that baud to the ESP32’s flash. Because the slow baud is saved to flash, the initial communication will fail after running the script the first time because the Mayfly is still trying at 115200, but the ESP’s already down to 9600. You can fix it by setting the modemBaud to 9600 in the first place, but remember that that won’t work with a new ESP32 bee. Even if you don’t change the baud, the two should sync after the first attempt at initialization when the Mayfly retries at the slower baud.