No. Take an elliptic curve $X$, and letLet $p \in X$$k$ be a $3$-torsion point. Then there is a plane model of $X$ as a cubic curve in $\mathbb{P}^2(\mathbb{C})$, such that $p$ is an inflexion point.
If $L$ is the corresponding inflexion linealgebraically closed field, then $U=X-L = X-\{p\}$ is dense inad take $X$ and affine$X=\mathbb{P}^2_k$, (being the complement of a hyperplane section)$U=\mathbb{A}^2_k$.
NowThen $X$ and $U$ are not homeomorphic, for instance because their fundamental groups aresince $U$ contains two disjoint, Zariski-closed, irreducible subsets made of more than one point (think of two parallel lines), but this is not isomorphic;possible in fact $$\pi_1(X) = \mathbb{Z} \times \mathbb{Z}, \quad \pi_1(U) = \mathbb{Z} \ast \mathbb{Z}.$$$X$ because of Bézout theorem.