This happens only when track lengths differ (e.g. due to frame losses), and we set the trim point at the final of the recording. Specially when we don't set a final trim point, and thus it defaults to the mediapackage duration.
The cause is that the Mediapackage allows Tracks with different durations, but the "Mediapackage duration" is always the duration of the longest Track. Therefore, the trim point can be set after the end some of the Tracks.
The trim operation should provide some mechanism to overcome those track length differencies.