Stacking Boxes Problem

I tried following this tutorial: https://www.youtube.com/watch?v=rLfxq5KavzM&t=758s But there is a gap between the boxes. What is wrong? Trailing gives a similar result.

This works somehow, but the cube initial Z scale has to be exactly 2m.

don’t ask me why, but this works as well: