If you are flattening a layerStack, have a look at the documentation here, which explains the subtleties, default behavior, and what you can do to override it. If you are flattening an entire stage and you are not getting the same “default behavior”, then I think that’s a bug to be reported.
We haven’t considered adding the same overriding ability to Flatten/Export, but the bottom line is that in a highly referenced scene, it really doesn’t seem safe to preserve “anchored” paths when flattening. But I guess providing the escape hatch if you really know your environment, as we provide for FlattenLayerStack, might be appropriate.