Question about stem length

Sometimes I don’t understand the stem length in Dorico. In attached example the second group of des, bes, as has longer stems than the first group. Why?

There must be some spacing-related reason for the difference. What else is going on in other instruments in the final beat of that bar?