When we deploy a document from a lower environment to a higher environment, its ID is getting changed. Due to this, constant points to invalid/wrong a document.
We are using direct deployment (Compare & Deploy)
Is it expected behavior?
Discussion posts and replies are publicly visible
Yes, this is the expected behavior... Because the document instance is different in the new environment. Reference the document instead of its ID and it will work.