Unable to hide progress bar even though hidden is true

I am struggling to switch off progress bar when jobs have finished. I says it hidden but it stay showing?

When the GitHub update query is complete use a Success event handler to progressBar2.setHidden(true)