Consider the following assertion:
Let $R$ be an integral domain with fraction field $K$. Let $X$ be a scheme and $X \to \operatorname{Spec}R$ a proper morphism. Then the natural map $$X(R)\to X (K) $$ is a bijection.
As usual, I use the notation $X(R):=\text{Hom}(\operatorname{Spec}R,X)$.
I know the assertion is true for Dedekind domains. But is it true for more general integral domains?
Are there counterexamples, for example, for $X$ the projective line over $R$?