Vanishing rests when changing instruments

The problem is caused by the fact that at the point where the new instrument begins, there’s no rest starting at exactly that point. If you create explicit rests for the instrument you’re changing to, as shown in the attached picture, you’ll get the correct notated result.