Help with mask/clip of Sprite2D

Godot Version

4.2

Question

So, i have 2 Sprite2D inside a CanvasLayer in order to render an health bar on top of my game.
The issue is that one of the Sprite2D is the border of the health bar while the second is the “inside” of the health bar, so my idea is to move the “inside” sprite depending on the current health status and hide the part of the “inside” sprite that are outside of the border sprite.

I tried both with “clip children” (both using those two sprites and using a third sprite to cover the outside area) and the CanvasGroup and Polygons (https://medium.com/@codingnstuff/godot-4-2-polygon-masking-ca46ca0361c5) methods.

Those are the 2 images (in case they are issues with them, but there are standard PNG with alpha values so they should work without problem): Assets - Album on Imgur

How to implement my type of health bar?

Thanks in advance.

i used the blue health sprite as the parent of the three since it was a solid and enabling the clipping method worked right. but since the health sprite is smaller then the boarder i had to scale the border down to fit the same foot print of the health sprite.