I am using Elementor page builder, I am using Toolset to pull in information from fields, the gallery CPT pulls in the images, but the lightbox no longer works. I disabled all of the plugins as instructed, added them back in one by one, and no fix. I added an image carousel element, did NOT use the toolset CPT gallery, and the lightbox worked. So, toolset stops the lightbox from working with the CPT.
I was able to reproduce this behavior on my test website too. Elementor's "Image Carousal" widget, shows the images with the lightbox if they are shown using a static source. But, the lightbox doesn't work, when a dynamic source is used.
Since the "Image Carousal" widget and the dynamic source feature, both are added and maintained by the Elementor plugin itself, I'll recommend reporting this limitation to their official support team.
I'll also tested some custom script workaround, but unfortunately, that didn't work either. I'm afraid, you'll have to wait for a fix from the Elementor side.