$\def\Spec{\operatorname{Spec}}$All questions and answers that I've found in MSE regarding a morphism of ringed spaces between affine schemes that isn't a morphism of locally ringed spaces are the same example, namely, this one. On the other hand, there are infinite counterexamples for l.r.s. that aren't affine schemes: given any non-local morphism of local rings $R\to S$, the morphism of ringed spaces $(\{*\},R)\to(\{*\},S)$ is not local. But can we produce more counterexamples between affine schemes different from the linked one? In Example 6.17 here (p. 29) one finds a morphism of ringed spaces $\Spec\mathbb{Q}\to\Spec\mathbb{Z}$ that is not local. More generally, given a PID $R$ and a prime $(p)\in R$, we can similarly produce a non-local ringed spaces morphism $\Spec Q(R)\to\Spec R$ that sends $*\in\Spec Q(R)$ to $(p)$. However, this idea reduces to that of the first linked case with the DVR $R_{(p)}$, by factoring the last morphism as $\Spec Q(R)\to\Spec R_{(p)}\to\Spec R$ (where the second arrow is the morphism of l.r.s. induced by $R\to R_{(p)}$).
So: can we cook up some genuinely new kind of morphism of ringed spaces $\Spec B\to\Spec A$ that is not of l.r.s.? Maybe this has been answered here before, but I have been unable to find it. (My question is motivated by, assuming $B$ is Jacobson, trying to find a morphism of ringed spaces $\Spec B\to\Spec A$ that is not of l.r.s. but such that the composite $\operatorname{Spm}B\to\Spec B\to\Spec A$ is a morphism of l.r.s. If such a morphism $\Spec B\to\Spec A$ were to exist, this would imply that at least one of “$A$ is Jacobson,” “$A\to B$ is of finite type” is false.)
EDIT: I just found a proof that if $B$ is Jacobson and the composite $\operatorname{Spm}B\to\Spec B\to \Spec A$ is a morphism of l.r.s., then so is $\Spec B\to\Spec A$. However, I'm still interested on the original question of constructing novel examples of non-local morphisms of ringed spaces between affine schemes.