For a local ring $R$ with maximal ideal $\mathfrak{m}\subset R$ and residue field $\kappa$, and a flat morphism $f\colon X\rightarrow \mathrm{Spec} R$ of schemes, we consider the short exact sequence of $\mathcal{O}_{\mathrm{Spec} R}$-modules (I omitted the tildes in the sequel) $$0\rightarrow \mathfrak{m}\rightarrow R\rightarrow\kappa\rightarrow0, $$ whose pullback on $X$ is the short exact sequence (left exactness holds since $X$ is $R$-flat) $$0\rightarrow f^{\ast}\mathfrak{m}\rightarrow \mathcal{O}_X\rightarrow \mathcal{O}_{X_{\kappa}}\rightarrow 0.$$ Then taking global sections on an open subset $U\subset X$ yields an injection $$\Gamma(U,\mathcal{O}_X)/\Gamma(U,f^{\ast}\mathfrak{m})\hookrightarrow\Gamma(U,\mathcal{O}_{X_{\kappa}}).$$ My question is, do we have $\Gamma(U,f^{\ast}\mathfrak{m})\simeq \Gamma(U,\mathcal{O}_X)\otimes_{R}\mathfrak{m}$? In fact, it is inspired by this question. Of course, when $U$ is affine then it is true, but I want to know the general case.
Note that $f^{\ast}\mathfrak{m}$ is a tensor product $f^{-1}\mathfrak{m}\otimes_{f^{-1}R}\mathcal{O}_X$, and taking global sections and tensor products are not compatible in general, so I wonder if in such special case we do have a compatibility.
N.B. The local ring $R$ is not assumed to be Noetherian so $\mathfrak{m}$ is not necessarily finitely generated.