srcset does not update after changing image src

I think there is some randomness to it. .src fails to work on most of my pages, but I have two pages where it works perfectly with identical code to the ones that fail! I’m certain that the properties are being updated as the tooltips change to the new file name and I’ve read it back to prove the change as well.
I’ve tried changing the images and creating new ones, neither work.