Because things like GPT have a limited contextual memory. When you exceed that token limit it starts forgetting things, which becomes problematic on long pieces of code.
Just copying the latest code every once in a while (as long as it isn't too long) and putting it in a new window commonly works around issues like that.
Just copying the latest code every once in a while (as long as it isn't too long) and putting it in a new window commonly works around issues like that.