Detection bar (custom shape)

So how would i make this bar fill up. I was thinking to have 2 squares to fill it from either side, but the issue of the squares being visible outside the bar is a problem as this is a custom shape. I cant figure out how to use clip descendants in such a situation as it has no effect.

ive removed the background on it btw