I have put some actions on "end of layout" (without any loops). I have tried to destroy some objects before changing layout and I have even put a wait 0 sec to ensure the freeze doent happen.
You don't need to delete objects (unless they are set as Global), and you definitely should not use Wait in "On end of layout" event.
Does it always happen with the same two layouts? Try adding "Browser log" at the end of layout1 and at the start of layout2, this will tell you when the problem happens exactly.
Also try disabling "On end of layout" and "On start of layout" events, see if the problem goes away. If it does, there must be something in these events.
Check if you have any global objects that don't need to be global, fix them..
If nothing helps, please share your project file.