ah yeah that's intentional, the way this game works the fire dynamically moves itself up when treasure is completely removed. If you don't have treasure to destroy you can get more from the shop, but beware the treasure is cursed haha. You win the game by buying your freedom from the shop for 100 money.
Also I'll try out raycasts in the future! I'm rather new to Godot so I kinda just went with what I knew for the guide. Thanks for the suggestion!