The following is a well-known result in point-set topology.
> **Proposition.** Two continuous functions $f, g \colon X \to Y$ from a topological space $X$ to a Hausdorff space $Y$, that coincide over a dense subset $D \subseteq X$, necessarly coincide everywhere.
_Proof._ Consider the set $$Z :=\\{x \in X \, | \, f(x)=g(x)\\} \subseteq X.$$ Then $Z$ is closed in $X$, since it is the preimage of the diagonal of $Y \times Y$ (that is closed because $Y$ is Hausdorff) via the continuous map $$h \colon X \to Y \times Y, \quad x \mapsto (f(x), \, g(x)).$$ On the other hand, by assumption $D \subseteq Z$ and so, since $D$ is dense in $X$, we obtain $$X = \bar{D} \subseteq \bar{Z} = Z,$$ that is $X = Z$ and the proof is complete.
Now we can get what you want from the Proposition above, because $A$ is dense in $\bar{A}$ and $Y$ is metric, hence Hausdorff.