The following is Exercise 15.3 of Görtz-Wedhorn Algebraic Geometry I:
Let $S$ be a Dedekind scheme with function field $K$ and let $f: X\to S$ be a proper morphism of schemes. Then the canonical map $X(S)\to X(K)$ is a bijection.
For example, the map $X(S)\to X(K)$ being injective means ${\rm Spec}\ K\to S$ is an epimorphism of schemes. I'm no idea to prove it, even for $S$ affine. For subjectivity, I can only see (using valuation criterion for being proper) that a morphism ${\rm Spec}\ K\to X$ extends to a morphism ${\rm Spec}\ \mathscr{O}_{S, y}\to X$ ($y$ being the image of ${\rm Spec}\ K\to X\to S$ but don't know how to extends to the whole of $S$.
I'm also wondering if the maps need to respect morphisms to $S$, namely if we need to consider $X_S(S)\to X_S(K)$ instead of $X(S)\to X(K)$.