When I was using NextGen 2.0, if you go to Options – then Effects and select “lightbox” from the dropdown menu, that fixed it for me.
Sadly, 2.0 caused some problems with my gallery so i had to backtrack to 1.8 where it was stable for what I needed.
As you can see the “Random Images” shown here:
https://thepunksite.com/
Don’t open up in the lightbox anymore.