Bar lines on the end of a part

Is it possible to have a bar with a repeat sign?

If the line is longer, it works, although initially many measures are displayed with rests that aren’t actually there. When you refresh the display, they disappear, but so does the repeat sign.

Is there any way to do this without the second bar?

I just noticed that this applies to all bar lines. As soon as the part ends at that point, a double end bar is automatically created, which cannot be overwritten.