I am trying to understand when a quantum channel preserves (part of) the information stored in an error correction code.
Take some $[[n, k, d]]$ quantum code with stabilizer set $\mathcal{S}$. The codewords are the following set of states
$$\{\vert\psi\rangle: \forall S\in \mathcal{S}, S\vert\psi\rangle = \vert\psi\rangle\}$$
Let us apply a quantum channel to the physical qubits such that we get $n'$ qubits in the output. Let us now consider some other $[[n', k', d']]$ quantum code with stabilizer set $\mathcal{S}'$. If I claim that this channel preserves any logical information of the input code then, what conditions must it satisfy?
For a specific example, consider a merge operation in lattice surgery described here. The effect of the physical operations is that they perform a logical $Z_1Z_2$ measurement and also transform the logical operators of the input code as follows
$$X_1X_2 \rightarrow X, Z_1 \rightarrow Z, Z_2\rightarrow Z$$
From this, one infers that the logical CPTP map is the isometry $|0\rangle\langle 00|+|1\rangle\langle 11|$ if the $Z_1Z_2$ measurement is $+1$ and $|0\rangle\langle 01|+|1\rangle\langle 10|$ if the $Z_1Z_2$ measurement is $-1$ as shown in the answer. The answer notes that coherences between $\vert 00\rangle$ and $\vert 11\rangle$ and coherences between $\vert 01\rangle$ and $\vert 10\rangle$ are preserved - so we have an isometry between those subspaces and the subspaces of the output code.
In this example, how does one know that the logical transformation is in fact an isometry on the eigenspaces of $Z_1Z_2$ and that coherences within those eigenspaces are preserved? More generally, how do we see what logical information is preserved during the action of a channel that takes us from one error-correcting code to another?