As far as I know you can only set a fixed lenght for lines, so you can’t have a line that adjusts inside an autolayout.
I’ve avoided using lines, instead I use an autolayout layer and set the height to something like 1 or 2 px so it appears as a line, however I’m working on a protoype that uses dashed lines and I can’t seem to make it work. Adding a fill setting to lines would solve issues like this.
Or if someone has a better way of working around this issue I’d love to know.