I'm reading Qing Liu's book corollary 3.21.
The condition of this corollay is 'X is a reduced connected algebraic variety proper over a field $k$'. Then the author conclude that $K\otimes_k\bar k = \mathcal O(X_{\bar k})$ where $K = \mathcal O_X(X)$ from a proposoition 2.24.
But this book does not have proposition 2.24.... The only theorem might be relevent is propositon 2.14 which shows a similar result but just for geometrically integral variety.
I'm confused how to get this identity.
I'm also wondering, in general, under what condition can we deduce that $\mathcal O_X(X)\otimes_k\bar k = \mathcal O(X_{\bar k})$?
Thank you in advance.


As suggested by Alex Youcis in the comments below his answer, I'm going to expand a bit on when a statement like you're after is true (potentially at the risk of being too general). Suppose $X$ is a scheme over $\operatorname{Spec} R$ and $\operatorname{Spec} S\to \operatorname{Spec} R$ is a flat morphism. Further, assume that one of the following conditions is satisfied:
Then $\mathcal{O}_{X\times_R S}(X\times_R S) \cong \mathcal{O}_X(X)\otimes_R S$. (I'll be writing $X\times_R S$ for $X\times_{\operatorname{Spec} R} \operatorname{Spec} S$ to save space/typing.)
Proof: Assuming 1, cover $X$ by finitely many affine opens $U_i$ by quasi-compactness. Cover each $U_i\cap U_j$ by finitely many affine opens $U_{ijk}$. Then by two applications of the sheaf condition, we have an exact sequence $$0\to \mathcal{O}_{X}(X) \to \prod \mathcal{O}_X(U_i) \to \prod \mathcal{O}_X(U_{ijk})$$ where all of the products actually finite (and thus the same as finite direct sums). Applying $-\otimes_R S$ and using the fact that tensor products commute with direct sums, we get the exact sequence $$0\to \mathcal{O}_{X}(X)\otimes_R S \to \prod \mathcal{O}_X(U_i)\otimes_R S \to \prod \mathcal{O}_X(U_{ijk})\otimes_R S.$$
Assuming 2, do the same thing except to get the same exact sequence $$0\to \mathcal{O}_{X}(X) \to \prod \mathcal{O}_X(U_i) \to \prod \mathcal{O}_X(U_{ijk})$$ except that we no longer have a guarantee that the products are finite. Instead, as $S$ is a finitely presented $R$-module, we have that tensoring with $S$ commutes with arbitrary products and thus we get $$0\to \mathcal{O}_{X}(X)\otimes_R S \to \prod \mathcal{O}_X(U_i)\otimes_R S \to \prod \mathcal{O}_X(U_{ijk})\otimes_R S$$ after applying $-\otimes_R S$.
By definition of the fiber product, the $U_i\times_R S$ cover $X\times_R S$ and the $U_{ijk}\times_R S$ cover $(U_i\times_R S)\cap (U_j\times_R S)$, so by two applications of the sheaf property we get an exact sequence $$0\to \mathcal{O}_{X\times_R S}(X\times_R S) \to \prod \mathcal{O}_{X\times_R S}(U_i\times_R S) \to \prod \mathcal{O}_X(U_{ijk}\times_R S)$$ and as $\mathcal{O}_{X\times_R S}(U_i\times_R S)\cong \mathcal{O}_X(U_i)\otimes_R S$, we have that $\mathcal{O}_{X\times_R S}(X\times_R S)$ and $\mathcal{O}_X(X)\otimes_R S$ are both the kernel of $\prod \mathcal{O}_X(U_i)\otimes_R S \to \prod \mathcal{O}_X(U_{ijk})\otimes_R S$ and thus must be canonically isomorphic.
How does this help in your situation? $X$ is finite type over a noetherian base $k$, and thus $X\to \operatorname{Spec} k$ is qcqs. As any $k$-module is flat, we're in exactly the hypotheses of the result above.
After a quick perusal of Liu's text, I don't see anything which will let you just cite away this issue, nor do I see this listed on the errata.