Irregular stem lengths

Does anyone why Dorico is creating different stem lengths for these groups of notes? These two examples were of the same passage but in different layouts.

irregular stem lengths 2.png
irregular stem lengths 1.png

The vertical snapping is giving different results because of the horizontal spacing, I would assume. When the beamed group is narrow enough, Dorico uses a fixed beam slant regardless of the interval deescribed by the first and last notes of the beam, whereas if it is wider, it will try to use the approrpiate ideal slant. Depending on what slant it’s trying to use, the way in which Dorico then resolves the valid positions for each end of the stem can produce different results.