Give it something to follow
The pan needs more scroll than the space the section takes, so the next section rides up over the pinned screen while the last tile leaves. Follow it with about a screen and a half of content. If it is the last thing on the page, wrap the page in an element with overflow: clip so the page ends with that content.
Lift the next section above the stage
Give whatever follows position: relative; z-index: 1, or it slides under the tiles.
Use square pictures
Tiles are square on desktop and 2:3 on phones, cropped with object-fit: cover. Keep the subject near the middle.
Number the tiles
Each tile needs style="--dgp-i: n", counting from 0. That is what puts it lower than the one before.