The question is local on $X$, hence we may assume $X$ is affine. By Limits, Lemma \ref{limits-lemma-relative-approximation} we can write $X = \lim X_i$ as a cofiltered limit with affine transition morphisms of schemes $X_i$ of finite type over $K$. Denote $X'_i =  X_i \times_{\Spec(K)} S'$ and $Y_i = X'_i \times_{S'} T$. By Lemma \ref{lemma-base-change-Rf-star-colim} it suffices to prove the statement for the squares with corners $X_i, Y_i, S_i, T_i$. Thus we may assume $X$ is of finite type over $K$. Similarly, we may write $\mathcal{F} = \colim \mathcal{F}[n]$ where the colimit is over the multiplicative system of integers invertible in $K$. The same lemma used above reduces us to the case where $\mathcal{F}$ is a sheaf of $\mathbf{Z}/n\mathbf{Z}$-modules for some $n$ invertible in $K$. \medskip\noindent We may replace $K$ by its algebraic closure $\overline{K}$. Namely, formation of direct image commutes with base change to $\overline{K}$ according to Lemma \ref{lemma-base-change-field-extension} (works for both $g$ and $h$). And it suffices to prove the agreement after restriction to $X'_{\overline{K}}$. Next, we may replace $X$ by its reduction as we have the topological invariance of \'etale cohomology, see Proposition \ref{proposition-topological-invariance}. After this replacement the morphism $X \to \Spec(K)$ is flat, finite presentation, with geometrically reduced fibres and the same is true for any base change, in particular for $X' \to S'$. Hence $(f')^{-1}g_*\mathcal{F} \to Rh_*e^{-1}\mathcal{F}$ is an isomorphism by Lemma \ref{lemma-fppf-reduced-fibres-base-change-f-star}. \medskip\noindent At this point we may apply Lemma \ref{lemma-base-change-does-not-hold-post} to see that it suffices to prove: given a commutative diagram $$ \xymatrix{ X \ar[d]_f & X' \ar[d] \ar[l] & Y \ar[l]^h \ar[d] \\ \Spec(K) & S' \ar[l] & \Spec(L) \ar[l] } $$ with both squares cartesian, where $S'$ is affine, integral, and normal with algebraically closed function field $K$, then $R^qh_*(\mathbf{Z}/d\mathbf{Z})$ is zero for $q > 0$ and $d | n$. Observe that this vanishing is equivalent to the statement that $$ (f')^{-1}R^q(\Spec(L) \to S')_*\mathbf{Z}/d\mathbf{Z} \longrightarrow R^qh_*\mathbf{Z}/d\mathbf{Z} $$ is an isomorphism, because the left hand side is zero for example by Lemma \ref{lemma-Rf-star-zero-normal-with-alg-closed-function-field}. \medskip\noindent Write $S' = \Spec(B)$ so that $L$ is the fraction field of $B$. Write $B = \bigcup_{i \in I} B_i$ as the union of its finite type $K$-subalgebras $B_i$. Let $J$ be the set of pairs $(i, g)$ where $i \in I$ and $g \in B_i$ nonzero with ordering $(i', g') \geq (i, g)$ if and only if $i' \geq i$ and $g$ maps to an invertible element of $(B_{i'})_{g'}$. Then $L = \colim_{(i, g) \in J} (B_i)_g$. For $j = (i, g) \in J$ set $S_j = \Spec(B_i)$ and $U_j = \Spec((B_i)_g)$. Then $$ \vcenter{ \xymatrix{ X' \ar[d] & Y \ar[l]^h \ar[d] \\ S' & \Spec(L) \ar[l] } } \quad\text{is the colimit of}\quad \vcenter{ \xymatrix{ X \times_K S_j \ar[d] & X \times_K U_j \ar[l]^{h_j} \ar[d] \\ S_j & U_j \ar[l] } } $$ Thus we may apply Lemma \ref{lemma-base-change-Rf-star-colim} to see that it suffices to prove base change holds in the diagrams on the right which is what we proved in Lemma \ref{lemma-kunneth-localize-on-X}.