For some reason, auto-upgrades (3rd button) stopped working on subsequent playthrus.
Fixed! Thanks for pointing out the issue, turns out the variable tracking the cost didn't get reset after each play. It should now work properly!