Sorry) I can send you the project itself. There is your code without edits. I don't know how to explain the problem to you. All I can see is that in the junction of tiles, the player sometimes gets stuck in a collision, and when doing so, there is a chance that the game will freeze.
Or maybe it would be more correct that you send your working version with a tile collision, and I will try to find the problem. Maybe I did something wrong. although I have tried several times.