Hi and welcome to devnet,
Please take the time to reduce your code to the minimal amount required to trigger your situation. Posting your whole project like that without any explanation about it does not really motivate to go through it.
That said, your back and forth logic looks wrong, you re-create new widgets all the time rather than rally switching between them. That could be one of the issue as you might be hogging your device memory and then it has to start using swap which is way slower than RAM.
On a side note, please use proper casing for your class names. Having class all lower case makes your code way harder understand and reason about. Python has style guidelines that you really should follow to make your life and the life of the people checking your code easier.