Hairpin affected by grace note

In this project I have hairpin settings set to end before barlines, but the selected one here - the one in the Alto/1st Alto staff/staves - ignored the instruction due to the presence of a grace note in the 2nd Alto in the next bar:


A similar issue (e.g. in the 1st beat of bar 27 of Flow 1 in the attached score) involving an unwanted lyric extender line was solved by putting the grace note in a new voice, but that doesn’t work in this case - instead I needed to adjust the hairpin in Engrave mode.
But why should the hairpin encroach into the next bar - even under the influence of a grace note - when the settings should prevent it?
(File attached; the video shows bars 31-32 of Flow 1.)
Cymun.dorico (1.6 MB)

The issue is the rhythmic duration of the hairpin. Dorico will only stop the hairpin before the barline if it rhythmically ends at the barline, which of course has the same rhythmic position as the first note of the following bar. This specific situation is a bit of a corner case, and I could certainly argue it both ways.

In practical terms, the thing to do is to use Shift+Alt+left arrow in Write mode to reduce the length of the hairpin by one notch, then in Engrave mode to lengthen it again slightly until it ends graphically at the same position as the hairpins on adjacent staves.

1 Like