You should not be using “while” for something that you intend to have checked every second. At what point do you expect for “body_entered” to become false?
A “while” loop causes the code to repeat forever until the condition at the top becomes equal to false (or you use break or continue). This means your signal starts the loop and then it never stops. This means nothing else in the game will happen either - if it’s not inside the while loop - which makes your game appear to freeze up (really it’s just running that tiny bit of code over and over).
Additionally, “body_entered” is a signal (assuming you’re using it as expected) so you need to watch for the signal to be emitted. There should be no need to check it every second because the engine will tell you if it gets triggered. Can you share more of your code?