Let $X$ be a topological space. Let $Y$ be a closed subset of $X$. Let $f\colon Y \rightarrow X$ be the canonical injection. Let $\mathcal{F}$ be a sheaf of abelian groups on $X$. Suppose $\mathcal{F}_x = 0$ for every $x \in X - Y$. Is the canonical morphism $\Gamma(X, \mathcal{F}) \rightarrow \Gamma(Y, f^{-1}(\mathcal{F}))$ an isomorphism?
Motivation Perhaps the above result can be used to prove this.
Let $U = X \setminus Y$, and let $j: U \to X$ be the inclusion. Given any sheaf $\mathcal F$ on $X$, there is a canonical short exact sequence $$0 \to j_! j^{-1}\mathcal F \to F \to f_* f^{-1}\mathcal F \to 0.$$ In your case, you are assuming that $j^{-1}\mathcal F = 0$ (since all the stalks vanish) and so you get $$\mathcal F \cong f_* f^{-1}\mathcal F.$$ Passing to global sections gives the statement you ask about.