I am reading an article in which a proof is based on defining a subsheaf by only giving its global sections.
The exact setting is that, one has a surjective finite morphism $f:Y\to X$ between separated $S$-schemes of finite type, over a Noetherian base $S$. Then, $\mathcal{A}$ is defined to be a subsheaf of the coherent sheaf $f_\ast\mathcal{O}_Y$ of $\mathcal{O}_X$-algebras, such that the ring of its global sections is a given $\Gamma(X,\mathcal{O}_X)$-subalgebra of $\Gamma(X,f_\ast\mathcal{O}_Y)\cong \Gamma(Y,\mathcal{O}_Y)$.
For the proof to work, $\mathcal{A}$ should be the largest coherent subsheaf in $f_\ast\mathcal{O}_Y$ of $\mathcal{O}_X$-algebras with the given global sections.
So, my question:
is the given information sufficient to determine $\mathcal{A}$? I.e. given a morphism $f:Y\to X$, as above, and a $\Gamma(X,\mathcal{O}_X)$-subalgebra $A\subseteq\Gamma(X,f_\ast\mathcal{O}_Y)$, is there a largest coherent subsheaf $\mathcal{A}\subseteq f_\ast\mathcal{O}_Y$ of $\mathcal{O}_X$-algebras, with $\Gamma(X,\mathcal{A})\cong A$? If so, how is it defined?
One has the subsheaf generated by $A$, but that may not be the largest (in terms of inclusions), especially when $f_\ast\mathcal{O}_Y$ is not generated by its global sections. That is, in some cases we need to have $A\cong \Gamma(X,f_\ast\mathcal{O}_Y)$, in which case we want $\mathcal{A}\cong f_\ast\mathcal{O}_Y$.
I need to use the result 'proven' in the article in my research, and I need this line of argument to work, maybe in a more restrictive setting. So, if the answer to the above question is negative, it will be useful to know
what extra 'mild' assumptions $f$ needs to satisfy for the desired subsheaf $\mathcal{A}\subseteq f_\ast\mathcal{O}_Y$ to be determined by its global sections.