1:1 ratio on a Collection List Lightbox Slider

I would like to create a grid in which all thumbnails appear square. In addition, I use the lightbox function.
Without the lightbox function it works without problems with the image-ratio settings (and relative and absolute positioning).
Inside the lightbox, however, everything “disappears”.

Does anyone have an idea how this can be implemented within the lightbox function.

Here is the read-only link with the current empty result.

Many thanks for any help!