I might be wrong, but I don’t recall seeing that behavior. Are you positive that all those notes are in the same voice? (Having voice colours on is a good idea in general)
Just tried reseting all my trill engraving options back to factory, and then reenabling lines on all. No change, which I didn’t expect as I haven’t tweaked any of those.
I just tested this, and it appears that Dorico does shorten the trill squiggle so that it doesn’t overhang terminating grace notes for measures of normal width. However, it stops doing that at a certain point with very narrow measures, as in your example.
Perhaps there is an option that controls this. I couldn’t find one for minimum measure width.
Indeed, Dorico will ensure that there are at least three complete “wiggles” in the trill extender line. I don’t think we expose that as an editable option.