How can I align the box of the boxed text (layout name) to the page margin?
If you look at the Layout Name paragraph style, you’ll see that there’s a left padding value applied. (I think these are the factory default values.)

If you edit the First page template for part layouts, you can select the text frame which contains the layout name and set its Left position to the same value as the padding in the paragraph style.
Result:


You’d have to adjust the token’s position in the page template by whatever the padding is in the paragraph style. You have to first unlock the constraint for the right (!) and input the amount needed into Frame:Left Alignment box. In my case, it was 0.88 mm.
beat me to it by 4 minutes!
I didn’t need to unlock the constraint, just set the Left value in Properties.
I really ought to do that automatically, me thinks. Or rather, use the box position instead of the text position to indent the box.
Jesper
In mine, it wouldn’t ungray the box unless I first unlocked the constraint.
I think you could argue this either way, whether the name itself or the border should be aligned with the music frame. In the default template, for example, the Lyricist token is also aligned with the left of the music frame but has no border. Personally, I think it would look better for the two text items to be aligned, with the layout name border outside of the frame, rather than having the border of the layout name aligned with the lyricist.
Rather than:
You might be right, but an option would be good. If you set your margins to match your printer, the box might go outside.
Jesper
It’s one of the many reasons I never use borders unless it’s needed to increase readability–which is almost never.




