Let $X \subseteq \mathbb{C^m}, Y\subseteq \mathbb{C}^n$ be algebraic (not necessarily irreducible), and let $\phi\colon X \to Y$ be a map such that for each $p \in X$, there are there is an open neighborhood $\mathcal{O} \subseteq X$ containing $p$ and polynomials $f_1,\ldots,f_n,g_1,\ldots,g_n \in \mathbb{C}[X_1,\ldots,X_m]$ such that the $g_i$'s don't vanish on $\mathcal{O}$ and for each $x\in \mathcal{O}$ we have
$$\phi(x) = \left(\frac{f_1(x)}{g_1(x)},\ldots,\frac{f_n(x)}{g_n(x)} \right).$$
Is it true that $\phi$ must be a continuous map with respect to the Zariski topologies? I have read a few answers on this site, but I find them unsatisfactory:
Continuity of rational functions between affine algebraic sets : The answer seems to assume that if polynomials are continuous in the Zariski topology, then maps whose values are quotients of polynomials are also continuous. I am not confident that this is true in the Zariski topology. In the comments of the answer the answerer shows why polynomials are continuous in the Zariski topology, but this is already clear to me.
The continuity of the rational maps in the zariski topology : The answerer assumes that to prove that a rational map is continuous, it suffices to prove that a morphism of algebraic varieties is continuous. I am new to algebraic geometry and don't see why this is true. Moreover, it seems to me that the coordinate ring homomorphism $\phi$ he mentions may not be surjective, and so the answerer incorrectly assumes that the inverse image of a maximal ideal is maximal.