The native Webflow lightbox component can be quite convenient to use, but it doesn't always play nice with the Webflow CMS.
We wrote a tiny and easily-implementable script that combines both components.
Create your nested collection with lightboxes, check "link with other lightboxes" and put "$" as the group name. Then, replace "collection-item" in the script with the class name you decided to give your collection item.
Cloneable link: Webflow Lightbox CMS with Image Gallery