I just tested, and it seems that the displayed cost resets on prestige, but the actual cost doesn't - I bought the first autoclick upgrade, and after prestige, the button said it cost 25, but wouldn't let me buy it until I had 43.
I'm familiar with Godot, and while I don't know much about GD script, I've been debugging C# for decades. If you want me to take a look, I'm happy to.