Denote $i : Y_s \times Y_s = X_s \times Y_s \to X \times_S Y$ the natural closed immersion. (We will write $Y_s$ and not $X_s$ for the fibre of $X$ over $s$ from now on.) Let $z \in Y_s \times Y_s = (X \times_S Y)_s \subset X \times_S Y$ be a closed point. As indicated we think of $z$ both as a closed point of $Y_s \times Y_s$ as well as a closed point of $X \times_S Y$. \medskip\noindent Case I: $z \not \in \Delta_{Y_s/k}(Y_s)$. Denote $\mathcal{O}_z$ the coherent $\mathcal{O}_{Y_s \times Y_s}$-module supported at $z$ whose value is $\kappa(z)$. Then $i_*\mathcal{O}_z$ is the coherent $\mathcal{O}_{X \times_S Y}$-module supported at $z$ whose value is $\kappa(z)$. Our assumption means that $$ K \otimes_{\mathcal{O}_{X \times_S Y}}^\mathbf{L} i_*\mathcal{O}_z = Li^*K \otimes_{\mathcal{O}_{Y_s \times Y_s}}^\mathbf{L} \mathcal{O}_z = 0 $$ Hence by Lemma \ref{lemma-orthogonal-point-sheaf} we find an open neighbourhood $U(z) \subset X \times_S Y$ of $z$ such that $K|_{U(z)} = 0$. In this case we set $Z(z) = \emptyset$ as closed subscheme of $U(z)$. \medskip\noindent Case II: $z \in \Delta_{Y_s/k}(Y_s)$. Since $Y_s$ is smooth over $k$ we know that $\Delta_{Y_s/k} : Y_s \to Y_s \times Y_s$ is a regular immersion, see More on Morphisms, Lemma \ref{more-morphisms-lemma-smooth-diagonal-perfect}. Choose a regular sequence $\overline{f}_1, \ldots, \overline{f}_r \in \mathcal{O}_{Y_s \times Y_s, z}$ cutting out the ideal sheaf of $\Delta_{Y_s/k}(Y_s)$. Since a regular sequence is Koszul-regular (More on Algebra, Lemma \ref{more-algebra-lemma-regular-koszul-regular}) our assumption means that $$ K_z \otimes_{\mathcal{O}_{X \times_S Y, z}}^\mathbf{L} \mathcal{O}_{Y_s \times Y_s, z} \in D(\mathcal{O}_{Y_s \times Y_s, z}) $$ is represented by the Koszul complex on $\overline{f}_1, \ldots, \overline{f}_r$ over $\mathcal{O}_{Y_s \times Y_s, z}$. By Lemma \ref{lemma-deform-koszul} applied to $\mathcal{O}_{S, s} \to \mathcal{O}_{X \times_S Y, z}$ we conclude that $K_z \in D(\mathcal{O}_{X \times_S Y, z})$ is represented by the Koszul complex on a regular sequence $f_1, \ldots, f_r \in \mathcal{O}_{X \times_S Y, z}$ lifting the regular sequence $\overline{f}_1, \ldots, \overline{f}_r$ such that moreover $\mathcal{O}_{X \times_S Y}/(f_1, \ldots, f_r)$ is flat over $\mathcal{O}_{S, s}$. By some limit arguments (Lemma \ref{lemma-limit-arguments}) we conclude that there exists an affine open neighbourhood $U(z) \subset X \times_S Y$ of $z$ and a closed subscheme $Z(z) \subset U(z)$ such that \begin{enumerate} \item $Z(z) \to U(z)$ is a regular closed immersion, \item $K|_{U(z)}$ is quasi-isomorphic to $\mathcal{O}_{Z(z)}$, \item $Z(z) \to S$ is flat, \item $Z(z)_s = \Delta_{Y_s/k}(Y_s) \cap U(z)_s$ as closed subschemes of $U(z)_s$. \end{enumerate} \noindent By property (2), for $z, z' \in Y_s \times Y_s$, we find that $Z(z) \cap U(z') = Z(z') \cap U(z)$ as closed subschemes. Hence we obtain an open neighbourhood $$ U = \bigcup\nolimits_{z \in Y_s \times Y_s\text{ closed}} U(z) $$ of $Y_s \times Y_s$ in $X \times_S Y$ and a closed subscheme $Z \subset U$ such that (1) $Z \to U$ is a regular closed immersion, (2) $Z \to S$ is flat, and (3) $Z_s = \Delta_{Y_s/k}(Y_s)$. Since $X \times_S Y \to S$ is proper, after replacing $S$ by an open neighbourhood of $s$ we may assume $U = X \times_S Y$. Since the projections $Z_s \to Y_s$ and $Z_s \to X_s$ are isomorphisms, we conclude that after shrinking $S$ we may assume $Z \to Y$ and $Z \to X$ are isomorphisms, see Lemma \ref{lemma-isomorphism-in-neighbourhood}. This finishes the proof.