Here is a counterexample for $K:=[0,1]$. There exists a Borel set $B\subset K$ that meets every non-empty open set $A\subset K$ in a subset of it of positive, not full Lebesgue measure: $0<|A\cap B|<|A|$. It’s a classic exercise by Rudin (Real and Complex Analysis, Chap.2).
Consider the bounded linear form on $C(K)$ $$\psi(f):=\int_Bf(t)dt-\int_{K\setminus B}f(t)dt.$$ I claim the closed hyperplane $V:=\ker\psi$ of $C(K)$ has the stated property. In order to prove it, let's define functions $$g_{x,m}(t):=(1-m|x-t|)_+$$ for $x\in K$ and $m>0$. Note that $|\psi(g_{x,m})|\le\frac1m$, and if $B$ has density $0$ resp. $1$ at $y$, then $\psi(g_{y,m})=-\frac1m(1+o(1))$ resp. $\psi(g_{y,m})=\frac1m(1+o(1))$, as $m\to+\infty$. Then the function
$$f :=g_{x,2m}+\lambda_m g_{y,m},$$ $$ \lambda_m:=-\frac{\psi(g_{x,2m})}{\psi(g_{y,m})} $$ for suitable $m$ and $y$ verifies
$$0\le f\le 1,\qquad f^{-1}(1)=\{x\},\qquad \text{supp}(f)\subset U,\qquad \psi(f)=0,$$ proving the claim. In order to choose $m$ and $y$, we first fix points $y_0$ and $y_1$ in $U\setminus\{x\}$ of density $0$ resp. $1$ for $B$, which implies $\limsup_{m\to\infty}|\lambda_m|<1$, both for the choice $y:=y_0$ and $y:=y_1$. Then we fix $m$ so large that $|\lambda_m|<1$ and that $g_{x,2m}$, $g_{y_0,m}$ and $g_{y_1,m}$ have their supports in $U$, pairwise disjoint, and lastly we choose $y\in\{y_0,y_1\}$ so that $\lambda_m\ge0$.