If a warning for a key signature change exists at the line break of a stave, the end of the stave line cannot be changed in the score layout because the end point cannot be grabbed with the Layout tool.
If you want to move the end of a stave line, you have to first remove the time signature change warning at the line break. In order to do so: