For anyone else who might run into this issue, I was able to figure out a workaround for now.
As long as you do not do any innerHtml replacements on any elements containing images which will be lightboxed, the issue will not occur. I was able to re-work some of my code to match elements more specifically and only target those which are not hrefs around images.