Overlay not working properly for arm rig

Have an issue where the overlay node isn’t getting the lines below the upper arm to disappear into the lower arm. Trying to get the arms to work like the following video. Any way to resolve the issue?

Does the overlay layer only contain the arm’s fill layer?
Does it cover the part where the line would cut the arm?
What is the composite node set to?

If you isolate the arm into its own composite and display
node with the overlay, does it work?