At 10:38 it clearly shows less than "10" left on the health bar, the relationship between the size of scrollbar and the current health is somehow not correct.
I just mean that the proportion seems off. It takes away 10 hp when you click, then takes away another 10 and continues, but on the last click there isn't the same amount left to take 10 away. On my end, when I followed along I ran out of health bar before I ran out of curHealth and when I'm looking at the canvas slider bar, when I slide the size bar it moves the mask too far and ends up with a red x to the left of the HP bar in the scene view.
I think you just resolved your own issue. The issue is that your mask is moving outside the bounds of what you're seeing. So it thinks the health bar area is bigger than it really is.
In the video I made the health bar slightly smaller than the length of the canvas which may have caused issues. You can actually apply the scrollbar component to the mask itself as well, just add the script to the mask instead. As long as the mask and the health bar match in size you shouldn't have any issues. If the object that has the scrollbar is a different size than the mask you'll have issues.