Fix a number $n > 0$. Given a smooth $\mathbb{Z}[1/n]$-scheme $X$ (i.e., a smooth scheme such that $n$ is invertible in its ring of functions), we may consider the étale sheaf $\mu_n$ on $X$ which associates to an étale map of the form ${\rm spec}(R) \to X$ the group of $n$-roots of unity in $R$. This sheaf is invertible with respect to tensor product of sheaves, with inverse given by $\mu_n^{-1} = {\rm Hom}(\mu_n,\mathbb{Z}/n)$. Now suppose that $Z \to X$ is a closed codimension 1 embedding of smooth $\mathbb{Z}[1/n]$-schemes, and let ${\cal F}$ be a locally constant étale sheaf of $\mathbb{Z}/n$-modules on $X$. Let $U = X \setminus Z$ be the complement of the image of $Z$. Then we have the Gysin isomorphism $H^{r+1}_Z(X,{\cal F})\cong H^{r-1}(Z,{\cal F}\otimes \mu_n^{-1})$ for $r \geq 1$ which gives rise to the residue map $$ {\rm res}_Z:H^r(U,{\cal F}) \to H^{r-1}(Z,{\cal F}\otimes \mu_n^{-1}) $$ (where we implicitly interpret ${\cal F}$ as a sheaf on $U$ or $Z$ by restriction). Now suppose that we have a pullback square of smooth $\mathbb{Z}[1/n]$-schemes $$\begin{array}[c]{ccc} Z & \stackrel{g}{\longrightarrow} & W\\ \downarrow && \downarrow\\ X & \stackrel{f}{\longrightarrow} & Y \end{array} $$ in which the vertical arrows are closed embeddings of codimension 1, and suppose that ${\cal F}$ is a locally constant étale sheaf of $\mathbb{Z}/n$-modules on $Y$. I would like to know when the residue map above commutes with base change in the above square, in the sense that for $r \geq 1$ and $\alpha \in H^r(Y\setminus W,{\cal F})$ we have $$ {\rm res}_Zf^*\alpha = g^*{\rm res}_W\alpha \in H^{r-1}(Z,{\cal F} \otimes \mu_n^{-1}) .$$ This does not hold for every pullback square. However, I believe it should hold for transverse squares, where we say that the square above is transverse if the sequence of sheaves on $Z$ $$ 0 \to \Omega_Y|_Z \to \Omega_X|_Z \oplus \Omega_W|_Z \to \Omega_Z \to 0 $$ is exact, where $\Omega_{(-)}$ denotes the cotangent sheaf (where the maps in the above sequence are constructed using signs that make the composition zero, I can provide more details if this part is unclear).
Question: is it true that residue maps commute with base change as soon as the pullback square is transverse?
I imagine that if this is true then it is well-known, but I was unable to find such a statement in the literature (I found some places where people seem to be implicitly using this statement in the case where $f$ and $g$ are closed embedding as well, but without a proof or references).