If you place a crescendo that ends with a dynamic mark on the last note, Dorico assumes that it lasts until the first beat of the next measure and adds a measure to the end of the piece. The workaround is to cut the last note short with a short rest before the barline.
Yeah, I know, and I don’t like the automatic behavior. But there’s a much easier way. Click on the last dynamic mark and press Shift-Alt-Left arrow once. It’ll shorten it by one rhythmic grid unit. Set your rhythmic grid small and the difference won’t be noticeable, but it will drop the last extra bar.