Haha yea, infinite loops can happen. You can hit esc and select ”give up” which will save your score too.
Great game, it's a little bit difficult to understand, but once you get it, it's super satisfying!