Testing the game for the 2nd time crashes the login session on Ubuntu

Info

OS: Ubuntu 24.04.1 LTS
Godot Version: 4.3 Stable

Issue

My login session on Ubuntu (booted from live USB) keeps crashing when I try to test the game on Godot for the second time. Perhaps it may be memory leak.

The game I am testing does not take much performance. It just has a few scripts and a player as a cylinder standing on top of a plane.

When the game runs for the second time, the OS freezes for about 2 minutes, goes black, then throws me into the logon screen as it logged me out.

Question

Is anyone able to provide me a solution or at least a cause?