As Taras Banakh noted, the answer is yes if $X$ is a continuum-connected space.

I'll identify $X$ with $\{0\}\times X$ throughout. Suppose there were a partition of $Y$ into disjoint clopen sets $A_1,A_2$ both containing elements of $\overline U$. For both $i$ let $A'_i$ be the intersection of $X$ and the $\mathbb{R}\times X$-closure of $A_i$. It follows from the assumptions on the $A_i$ that the $A'_i$ are nonempty, closed, and cover $X$. It suffices to show that the $A'_i$ are disjoint.

Note that $A'_i\subseteq A_i\cup (\overline Y\setminus Y)=A_i\cup(X\setminus \overline U)$. In particular $A'_1\cap A'_2\cap\overline U=A_1\cap A_2\cap\overline U=\emptyset$.

Let $V$ be a connected component of $X\setminus U$. The $A_i$ are a clopen partition of $Y$, so each $\{1/n\}\times V$ is, as a connected component of $Y$, contained in exactly one of the $A_i$. As a result, each $A'_i$ must contain either all or none of $V$. Since $X$ is continuum-connected, $V$ is clopen and therefore there is a point $y$ in $\partial U\cap V$, which by the previous paragraph is contained in exactly one of the $A'_i$. Hence $A'_1\cap A'_2\cap V=\emptyset$, and moreover $A'_1\cap A'_2\cap (X\setminus U)=\emptyset$.