Shorten (all) systems with fewer bars

If you have Dorico Pro, it is possible to achieve the appearance you want without manually shortening systems within a flow by creating a single player holding a piano and the 0-line instrument from this post and alternating between these instruments:

To obtain relatively constant bar sizes, set the Custom spacing ratio to 2 in Layout Options > Note Spacing and specify a Fixed number of bars per system in Layout Options > Staves and Systems > Casting Off. Add a hidden whole note to the 0-line instrument in every measure following the execise on each system. To hide the barlines for the 0-line instrument, set the Minimum barline protusion to 0 spaces in Engraving Options > Barlines > Design. To see the barline at the end of each exercise, add a hidden coda every time you change to the 0-line instrument. To hide the instrument change labels, remove the Border in Library > Paragraph Styles > Instrument Change Labels and change the short names for both instruments to a space.