I am not seeing anything "optical" there... The 1st image shows stuff that has to do with the conversion software method, (over)exposure. Your eyes want to see "blue" in the white fringe. What do they see above the beak (yellow)? Do a 300% pixel peep and you will see what I am trying to get at.
The 2nd image shows a lot of noise reduction, (blotchy OOF green bokeh shapes), so it makes no sense to study that particular image for optical or not artifacts...
By the way, the 1st image ALSO shows a lot of NR, even though you have a D500 and images should not need any NR to begin with (although I can't see which ISO setting you used). So first get to grips with the conversion side of things? ;-)
Is this (conversions) done by Lightroom? I can't imagine all the NR crap and artifacting is introduced by flickr...
Here a 400% pixelpeep for your consideration:
(Size: 48.68 KB / Downloads: 4)
Green line around areas where few blue pixels pop up, they are from the used demosaicing algorithm used, going from white to dark and taking some wrong guesses. Between those blue-ish results you can see a redish result in the magenta line, also from the same demosaicing algorithm. You are using a bayer pattern CFA sensor after all.
Around the whole edge is a ghost edge, in "white" as seen within the red line, and as seen in "yellow" within the blue line.
Ah, you added a 3rd image.
To me, that too looks like CFA conversion stuff, the bright white and hard edge to the darker green making for some "odd" demosaicing/interpolating choices and a blueish pixels as a result.