I think there should be a back button for the AI league so that you can see the code you have written before. This could be useful because you can mess up your code, delete all of it on accident, or if you try out a new strategy and it ends up messing up your score and your place on the leaderboard, you can simply go back and fix it.
That happened to me in lava lake my whole code got deleted half way through but I had a earlyer version saved but it was bugged so I had to debug it but I still got second place
My choice is to save good codes locally in the computer.
ctrl+z by keeping tab open or just put it in google doc/keep