Can't run a long script without IDX disconnecting

My GenAI python app typically takes around 20-30 minutes to complete when run. About half the time, IDX will disconnect before it completes. My internet connection is fine.