If I have an affine scheme $X=\operatorname{Spec}A$, and an open subscheme $Y=\operatorname{Spec}B$ which is also affine and whose topological space is different from $X$, does it follow that $X$ and $Y$ are non-isomorphic?
But if $X$ and $Y$ would be isomorphic, then we'd have $A\cong B$ and hence $Y$ and $X$ must actually be the same as subsets of $X$, because the prime ideals of $A$ are $1:1$ to the prime ideals in $B$. I think I'm confused here in this situation about the interplay of "being the same" and "being isomorphic".
Let $k$ be a non-trivial ring. Consider $A = k [s_1, s_2, s_3, \ldots, t_1, t_2, t_3, \ldots] [s_1^{-1}, s_2^{-1}, s_3^{-1}, \ldots]$, that is, the polynomial ring over $k$ in countably infinitely many variables, with half of those variables made invertible by localisation. Let $B = A [t_1^{-1}]$. Then $A \cong B$ as $k$-algebras: there is a unique homomorphism $B \to A$ sending $t_1$ to $s_1$, $t_{n+1}$ to $t_n$, and $s_n$ to $s_{n+1}$, and it has an obvious inverse. So $\operatorname{Spec} A \cong \operatorname{Spec} B$ as schemes over $\operatorname{Spec} k$. But $A \ncong B$ as $A$-algebras, and $\operatorname{Spec} B$ as a scheme over $\operatorname{Spec} A$ is a non-surjective open immersion.
Moral: you have to pay attention to the category when asking whether two objects are isomorphic.