What LLM are you using? What you describe should be no problem for gemini free or claude haiku and above. Other models, I dunno.
I don't have direct experience with ChatGPT but those that do that I've talked to place it behind Gemini and Claude models.
Try free Claude or Gemini on the web and see if you have a better experience. Claude free is better than Gemini free. (actually, Gemini free seems extra dumb lately).
I gave them the same prompts. Both failed to give a working solution. I lost track of how many times it said "This is the guaranteed to work final solution" which still had the same problem as the 5 previous failures.
I gave up after around 40 failed prompts in a row where it was "Absolutely certain" it will work and is the "final boss" of the solution.