Consider the following subsets of $\mathbb{C}^n$ given by $$ X := \{x \in \mathbb{C}^n: f(x) =0, ~~g(x) \neq 0 \} $$ $$ Y := \{ x \in \mathbb{C}^n: f(x) =0, ~~g(x) =0, ~~h(x) \neq 0 \} $$
where $f, g$ and $h$ are holomorphic functions.
Let us also assume that $Y$ is non empty. In particular
this would avoid something like $h(x)$ being a ``factor'' of
$g(x)$.
Then is it always
true that
$$ \bar{X} \subset X \cup \bar{Y} $$
where $\bar{X}$ and $\bar{Y}$ denote the respective closures taken inside $\mathbb{C}^n$?
If this is not true, then is there any reasonable condition on $f$, $g$ and $h$ to ensure that this is true?