Relation from DB to geojson feature

I’m trying to query DB (relation + relationmembers + way + … + Nodes) and transform results in a featurecollection.
My query return nodes in the correct order, but I’d like to save a relation as a single feature.
My geojson is formally correct, but on a map it’s not showed well.
Otherwise, if I transform any way in a single feature and a relation in a featurecollection (with the same query) the geojson is showed correctly on the map.
Why?
Thank you

Perhaps helpful: You could try the “export to GeoJSON function” on https://overpass-turbo.eu/ and compare the results with yours.

It’s a good idea, i don’t know this function