Define Inside for stroke on an unclosed path (as if it was a closed path)

I have an unclosed path that is like a rounded rectangle with the middle third of the top edge cut out. It is to copy another rounded rectangle. I was wondering if I could make the stroke stay Inside like the original rounded rectangle. With part of the path cut out the stroke even with Inside selected is more like Center would be for the original rounded rectangle.

I noticed this as I was creating masks to make an effect like three of these layer on top of each other and the radius of the circles I’d used for the mask was wrong.

Is there a way to get what I want? Can I tell Figma that it should treat it as though the two ends are joined for the inside stroke?
Altenatively, can I make one section of the path transparent?
Or, convert the rounded rectangle to define a path with fill that looks exactly like the original stroke path? (This is less ideal as it’s harder to modify and experiment with.)
Or, I guess I could use a mask to define the section without the cut out? (Again this is harder to play and experiment with.)

I’m also wondering if there’s a sneaky way to do this by defining dash length and gap? Though playing with it, it seems that the dashes restart at each corner.

I used a mask over the original rounded rectangle. It worked fine in this case. Though it would be difficult if I wanted to change the size or shape of the rectangle.