Yes, I know exactly what is wrong.
The pin coordinates are being stored as absolute pixel values captured from the click position relative to the image's rendered size at that moment. When the window resizes, the image re-renders at a different size — but the stored pixel coordinates don't update, so the markers drift away from where they were originally placed.
The fix is straightforward: at click time, convert the pixel coordinates to percentages (0–1) by dividing by the image's current rendered width and height. Then when rendering markers, position them with left: pinX * 100 + "%" and top: pinY * 100 + "%". This way the markers are always relative to the image's current rendered dimensions, regardless of window size.
Clear to fix?