Thanks for your comment!
As a reply to your suggestion, here's what I thought myself when making the decision to allow infinite retries. In my mind the target number is something that sets some expectations for the player, but in the end I did not want to make them start over the game because of using too many lines on one level. After completing the game the player can try again to improve their total score and try to solve the levels with fewer lines than last time. The challenge in the game comes from the players own ambitions and expectations they set for themselves. Of course, one could solve all levels by just taking minimal steps at a time until at goal, but I think no one would actually want to do that (unless they have been stuck for a same level really long time). After all, what's the point of playing a game if one does not want to do their best. Also, this is something that is connected to the Courage theme of another Jam this game was submitted for. The target numbers sets some expectations to the player but still in the end the player themselves are responsible for making the decision how big risks they want to take. If the limit was absolute, with one attempt left, it would not leave the player no choice but to try to solve the whole level with one line. In my own personal opinion, this is not as interesting as to force the player to make the optimization decisions themselves.