I think that a family of counterexamples can be constructed in the following way. Note that my notation is slightly different from yours.
Start with a smooth, minimal projective surface $X$, and let $\tilde{X}$ be the blow-up of $X$ at a point $p \in X$. If $E$ is the exceptional divisor, $H$ is an ample divisor on $\tilde{X}$ and $n \in \mathbb{N}$ is big enough, a general divisor $D \in |nH| $ is smooth and irreducible and $\tilde{D}=D + E$ is ample, too.
Then $\tilde{X}-\tilde{D}$ is an affine variety,isomorphic isomorphic to an affine subvariety $X^{0} \subset X$. Moreover, composing the isomorphism $X^{0} \to \tilde{X}-\tilde{D}$ with the inclusion $\tilde{X}-\tilde{D} \to \tilde{X}$, we get a birational morphism $\phi \colon X^{0} \to \tilde{X}$.
Such a morphism cannot be extended to a birational morphism $f \colon X \to \tilde{X}$. In fact, by minimality of $X$ such an extension would be an isomorphism, a contradiction since $X$ and $\tilde{X}$ have different Picard numbers.