Layout shifting problem

After generating around 10-14k tokens, the layout shifts automatically. I tried debugging it but couldnt find the solution. Can someone please help me. i have been stuck on this issue from 2-3 days now havent gotten any good sleep