Can't connect to the xbee

I ran a code on my xbee that was a print command in a loop. Now I cannot connect to it and therefore cannot change the code. Is there any way that I can factory reset it without having to connect to it or anything else I could try. The module I am using is Digi XBee 3 PRO, 2.4 Ghz Zigbee 3.0, PCB Ant, TH MT. I’ve tried the recovery tool in XCTU and that did not work.

Sure, try using the Over the air command interface to turn off the Micro Python function and reboot the module. You can also issue the Restore command (ATRE). That will not remove the python code but it will change the settings to defaults.