Perhaps a property that contains an associative array that serves as a substitution table for any referenced object IDs or it’s children (if I’m not making a grossly bloated proposition)?
{ "type": "Note", "id": "https://alice.example/objects/123", "content": "This is a AP/DID polyglot post", "inReplyTo": "https://bob.example/objects/567", "didMap": { "https://alice.example/objects/123": "did🔑zAbc123xyzBaSe64zyx/post/123", "https://bob.example/objects/567": "did🔑z6ZxyBl0bofMu1tih4sh3tc/post/567" } }