Hide anticipatory key signature at end of line?

At the start of the new line, add a coda, then hide the coda sign. In Engraving Options—Repeat Markers, set your mid-system coda gap to 0.

If it’s for a worksheet, or a separate exercise, you can begin a new flow. Layout Options—Page Setup—Flows, allow new flow to begin on same page.