>>2049331The trick is to color-select the background area and then expand the selection or feather it outwards another pixel (or both).
That ensures you catch the "borderline" pixels responsible for the jaggies.
THEN you flood fill. In this case, I set the fill mode "if darker" and that preserved the black outline.
Finally, I extended the selection one more pixel to include the very edges of the girl and applied half-a-pixel of Gaussian blur.