If you allow the open sets $X$, $U$ and $V$ to be disconnected, you get a counter-example by taking a countable example and changing points to pairwise disjoint balls.