Hi ! I thought we have a softlock. After verification, you can just press down (of left) while being in the loop and it get you out of it (your frog will descend after stepping on the chest).
And also to avoid that ! I changed the tile on top of the chest to avoid this cycle. The build will come a little bit later today !
Did you take time to finish the game after you encounter the loop ?