Centerline trace seems to do the best that I can think of.
I exported your blue and green as separate black images over transparent (let's call them large.png[blue converted to black] and small.png[green converted to black]).


Then used this online site to centerline-trace the black images.
https://online.rapidresizer.com/tracer.phpand got these as svg, I just load them up in GIMP and convert using default settings:


I then brought these centerlines in as layers on top of original image.
and make minor adjustments such as closing of the area, if it's not yet a closed loop (like in this case the large centerline was closed off, but the small [green area] center line wasn't closed off so I draw extra pixels to close it off.
Then select the area inside and colored it like below.
with the centerlines layers turned on (and colored as white)

with the centerlines layers turned off.

Then I chose the area, grew selection by 2 pixel and shrunk it back down by 2 pixels so that it would get rid of those cuts/lines that go inside the shape.

That's it.