Assuming the Lightbox is not properly getting the data passed from the repeater, I believe the issue is when you attempt to access the context data.
Original Code:
let records = wixWindow.lightbox.getContext();
let pn = records.pn;
Instead it should be:
let pn = wixWindow.lightbox.getContext();
Since you passed in a string ($item(‘#text111’).text) you do not need to access the .pn property to get the value within the Lightbox.