In y-websocket , the prosemirror node is being deleted during initialization

In my web app, when I create a new task session on it, it will create a new prosemirror editor,and this editor will create a new empty yDoc and a new websocketProvider.
When my server detects that a new task has been created, it will push a piece of PM JSON over the server’s WebSocket based on the template of the current task.

{
                "doc": {
                    "type": "doc",
                    "content": [
                        {
                            "type": "paragraph",
                            "content": [
                                {
                                    "type": "file",
                                    "attrs": {
                                        "fileId": "Zr8SjMyrgaPurgL7Z64TGOawQwcLXpVIRDZ2tKM_5xM=",
                                        "title": "image.jpg",
                                        "file": '{"id":"Zr8SjMyrgaPurgL7Z64TGOawQwcLXpVIRDZ2tKM_5xM=","name":"image.jpg","size":35841,"sign":"booking.dL8dgpPtj6DvrgX5Ro0VHuC2RQENWJNOQjBwsqU54RU=:daUbm8ysr4vEhCnXaaAdFui-TQkFUJtGSjh4uq0x6R0=.B4Yrsqbl7AajF71hD63bIyP4MujfvShH85HUg6LIcQx","hasCDN":true,"type":null,"width":445,"height":412}',
                                        "sign": "xxxx",
                                        "imFileId": "xxx",
                                        "extra": {},
                                        "fromTicketId": "dL8dgpPtj6DvrgX5Ro0VHuC2RQENWJNOQjBwsqU54RU=",
                                    },
                                    "content": [
                                        {"type": "text", "text": "图片.jpg"}
                                    ],
                                }
                            ],
                        }
                    ],
                },
                "selection": {"type": "text", "anchor": 223, "head": 223},
            }
 const pmNode = PmNode.fromJSON(_PM_SCHEMA, pmJson)
const yDoc = y_prosemirror.prosemirrorToYDoc(pmNode)
// --------------------------------------------------
const encoder = encoding.createEncoder();
const decoder = decoding.createDecoder(message);
encoding.writeVarUint(encoder, messageSync);
syncProtocol.readSyncMessage(decoder, encoder, this.yDoc, conn);
   if (encoding.length(encoder) > 1) {
      this.send(conn, encoding.toUint8Array(encoder));
}

However, when the frontend receives this update and applies it to the yDoc on the web page, the “file” node is in a deleted state. That means after processing the code Y.applyUpdate(doc, decoding.readVarUint8Array(decoder), transactionOrigin) , the “file” node in the doc is marked as deleted, and the output YXmlFragment does not include the “file” node.

Can anyone help me? I am not very familiar with Yjs. What are the differences between these two updates that cause one to show the file node and the other not?

// this can show
const vv = '2,1,225,160,156,233,3,0,168,251,159,200,237,1,7,1,118,1,8,105,109,103,69,120,116,114,97,118,2,12,99,117,115,116,111,109,72,101,105,103,104,116,127,11,99,117,115,116,111,109,87,105,100,116,104,127,8,251,159,200,237,1,0,7,1,11,112,114,111,115,101,109,105,114,114,111,114,3,9,112,97,114,97,103,114,97,112,104,7,0,251,159,200,237,1,0,3,4,102,105,108,101,40,0,251,159,200,237,1,1,6,102,105,108,101,73,100,1,119,44,90,114,56,83,106,77,121,114,103,97,80,117,114,103,76,55,90,54,52,84,71,79,97,119,81,119,99,76,88,112,86,73,82,68,90,50,116,75,77,95,53,120,77,61,40,0,251,159,200,237,1,1,4,115,105,103,110,1,119,4,120,120,120,120,40,0,251,159,200,237,1,1,8,105,109,70,105,108,101,73,100,1,119,3,120,120,120,40,0,251,159,200,237,1,1,5,116,105,116,108,101,1,119,10,229,155,190,231,137,135,46,106,112,103,40,0,251,159,200,237,1,1,12,102,114,111,109,84,105,99,107,101,116,73,100,1,119,44,100,76,56,100,103,112,80,116,106,54,68,118,114,103,88,53,82,111,48,86,72,117,67,50,82,81,69,78,87,74,78,79,81,106,66,119,115,113,85,53,52,82,85,61,33,0,251,159,200,237,1,1,5,101,120,116,114,97,1,1,251,159,200,237,1,1,7,1'.split(',')

// this can not

  const aa ='1,10,209,211,225,135,4,0,7,1,11,112,114,111,115,101,109,105,114,114,111,114,3,9,112,97,114,97,103,114,97,112,104,7,0,209,211,225,135,4,0,3,4,102,105,108,101,7,0,209,211,225,135,4,1,6,4,0,209,211,225,135,4,2,10,229,155,190,231,137,135,46,106,112,103,40,0,209,211,225,135,4,1,6,102,105,108,101,73,100,1,119,44,90,114,56,83,106,77,121,114,103,97,80,117,114,103,76,55,90,54,52,84,71,79,97,119,81,119,99,76,88,112,86,73,82,68,90,50,116,75,77,95,53,120,77,61,40,0,209,211,225,135,4,1,4,115,105,103,110,1,119,4,120,120,120,120,40,0,209,211,225,135,4,1,8,105,109,70,105,108,101,73,100,1,119,3,120,120,120,40,0,209,211,225,135,4,1,5,116,105,116,108,101,1,119,10,229,155,190,231,137,135,46,106,112,103,40,0,209,211,225,135,4,1,12,102,114,111,109,84,105,99,107,101,116,73,100,1,119,44,100,76,56,100,103,112,80,116,106,54,68,118,114,103,88,53,82,111,48,86,72,117,67,50,82,81,69,78,87,74,78,79,81,106,66,119,115,113,85,53,52,82,85,61,40,0,209,211,225,135,4,1,5,101,120,116,114,97,1,118,0,0'.split(',')