Let $P$ be a subset of $\mathbb{R}^n$. Lets suppose that $\chi_P$ is almost everywhere equal to a continuous function $g$ which satisfies $$\lim_{|x|\to\infty}g(x)=0.$$ I want to prove that $P$ has empty Lebesgue measure.
Lets call $Q\subset\mathbb{R}^n$ the set of all the points $x$ in which $\chi_P(x) \neq g(x)$. Since $\mathbb{R}^n\setminus Q$ is dense and $g$ is continuous, $g$ is determined by its value in $\mathbb{R}^n\setminus Q$. I really think that $g|_{\mathbb{R}^n\setminus Q}=0$ but I can't figure out how to prove it.
If $P$ had positive measure, then $g$ takes the value $1$ and because of the limit it takes also values arbitrarily small. Therefore, $g$ takes the value $1/2$ at some point $x$, and there is a neighborhood around $x$ at which $g$ is between $1/4=1/2-1/4$ and $3/4=1/2+1/4$. This contradicts that $g$ and $\chi_P$ are equal a.e.
If $P$ has positive measure, then $g$ takes the value $1$ because otherwise $\chi_P$ and $g$ would be different on all of $P$ and therefore not equal a.e.
If $g$ takes the value $1$, since it also tends to $0$, then it takes values arbitrarily small. In particular some value $a<1/2$. By the intermediate value theorem it must take all values in between. In particular, it takes the value $1/2$.