I don’t know if I’m doing it wrong but Dorico doesn’t seem to be able to Trim Flow when there’s a multi measure rest at the end. At the moment you have to go to Layout Options, select the score, disable multi-measure rest, trim flow, then re-enable multi-measure rests in order to do it.
Please have Dorico be able to trim multi-measure rests.
It works fine for me, are you absolutely sure that there’s nothing that exists in any of those bars in any part that would prevent Dorico from trimming? An extended gradual dynamic or lyric, perhaps?
If this is happening consistently in a project, can you share that project file?