Consider a smooth projective morphism of schemes $X \rightarrow S$ with relative dimension $n$ (the application I have in mind is with $S$ = an open subset of $\text{Spec } \mathbb{Z}$) and assume that $V$ and $W$ are two closed subscheme of $X$, flat over $S$, such that $\text{codim}(V) + \text{codim}(W) = n$.

Denote the fibers of $X,V$ and $W$ over $s \in S$ by $X_s,V_s$ and $W_s$ and write $A^{\bullet}(X_s)$ for the Chow ring of $X_s$. The proper pushforward of the structure morphism of $X_s$ induces a morphism $\text{deg} : A^{n}(X_s) \rightarrow \mathbb{Z}$.

For every $s \in S$, the intersection of $V_s$ and $W_s$ in $X_s$ gives an intersection number $\text{deg}([V_s].[W_s]) \in \mathbb{Z}$. Is there an upper semi-continuity result on the function $s \mapsto \text{deg}([V_s].[W_s]) \in \mathbb{R}$ ?

My question is related to this post : Semi-continuity of intersection numbers but the example given in the comments does not satisfy the flatness assumption.