Hi Karan,
Are you able to solve in Refine mode without script, this looks problem with solving in refine mode. Can you please try running the bracket sample case in Refine mode and see if that runs.
I tried the same at my end and was able to run the script:

Regards,
Devendra