Archives have not taken a consistent stance on this. Preservation, removal, restricted access, de-indexing, and “right to be forgotten” sit on a spectrum.
Good archival practice has to include judgment, context, and humility.
Sometimes that means preserving. Sometimes it means limiting access. And sometimes it may mean "honoring" a removal request or court order, even if you're just setting a flag.