Since the statement only concerns $X$, we may replace $\overline{X}$ by a different proper variety over $k$. Let $\nu : \overline{X}^\nu \to \overline{X}$ be the normalization morphism. By Lemma \ref{lemma-normalization-locally-algebraic} we have that $\nu$ is finite and $\overline{X}^\nu$ is a variety. Since $X$ is normal, we see that $\nu^{-1}(X) \to X$ is an isomorphism (tiny detail omitted). Finally, we see that $\overline{X}^\nu$ is proper over $k$ as a finite morphism is proper (Morphisms, Lemma \ref{morphisms-lemma-finite-proper}) and compositions of proper morphisms are proper (Morphisms, Lemma \ref{morphisms-lemma-composition-proper}). Thus we may and do assume $\overline{X}$ is normal. \medskip\noindent We will use without further mention that for any affine open $U$ of $\overline{X}$ the ring $\mathcal{O}(U)$ is a finitely generated $k$-algebra, which is Noetherian, a domain and normal, see Algebra, Lemma \ref{algebra-lemma-Noetherian-permanence}, Properties, Definition \ref{properties-definition-integral}, Properties, Lemmas \ref{properties-lemma-locally-Noetherian} and \ref{properties-lemma-locally-normal}, Morphisms, Lemma \ref{morphisms-lemma-locally-finite-type-characterize}. \medskip\noindent Let $\xi_1, \ldots, \xi_r$ be the generic points of the complement of $X$ in $\overline{X}$. There are finitely many since $\overline{X}$ has a Noetherian underlying topological space (see Morphisms, Lemma \ref{morphisms-lemma-finite-type-noetherian}, Properties, Lemma \ref{properties-lemma-Noetherian-topology}, and Topology, Lemma \ref{topology-lemma-Noetherian}). For each $i$ the local ring $\mathcal{O}_i = \mathcal{O}_{X, \xi_i}$ is a normal Noetherian local domain (as a localization of a Noetherian normal domain). Let $J \subset \{1, \ldots, r\}$ be the set of indices $i$ such that $\dim(\mathcal{O}_i) = 1$. For $j \in J$ the local ring $\mathcal{O}_j$ is a discrete valuation ring, see Algebra, Lemma \ref{algebra-lemma-characterize-dvr}. Hence we obtain a valuation $$ v_j : k(\overline{X})^* \longrightarrow \mathbf{Z} $$ with the property that $v_j(f) \geq 0 \Leftrightarrow f \in \mathcal{O}_j$. \medskip\noindent Think of $\mathcal{O}(X)$ as a sub $k$-algebra of $k(X) = k(\overline{X})$. We claim that the kernel of the map $$ \mathcal{O}(X)^* \longrightarrow \prod\nolimits_{j \in J} \mathbf{Z}, \quad f \longmapsto \prod v_j(f) $$ is $k^*$. It is clear that this claim proves the lemma. Namely, suppose that $f \in \mathcal{O}(X)$ is an element of the kernel. Let $U = \Spec(B) \subset \overline{X}$ be any affine open. Then $B$ is a Noetherian normal domain. For every height one prime $\mathfrak q \subset B$ with corresponding point $\xi \in X$ we see that either $\xi = \xi_j$ for some $j \in J$ or that $\xi \in X$. The reason is that $\text{codim}(\overline{\{\xi\}}, \overline{X}) = 1$ by Properties, Lemma \ref{properties-lemma-codimension-local-ring} and hence if $\xi \in \overline{X} \setminus X$ it must be a generic point of $\overline{X} \setminus X$, hence equal to some $\xi_j$, $j \in J$. We conclude that $f \in \mathcal{O}_{X, \xi} = B_{\mathfrak q}$ in either case as $f$ is in the kernel of the map. Thus $f \in \bigcap_{\text{ht}(\mathfrak q) = 1} B_{\mathfrak q} = B$, see Algebra, Lemma \ref{algebra-lemma-normal-domain-intersection-localizations-height-1}. In other words, we see that $f \in \Gamma(\overline{X}, \mathcal{O}_{\overline{X}})$. But since $k$ is algebraically closed we conclude that $f \in k$ by Lemma \ref{lemma-regular-functions-proper-variety}.