Assume $S$ is a normal surface (so 2-dimensional $k$-scheme). Let $\mathcal{L}, \mathcal{N}$ be zwo invertible sheaves on $S$ such that they coinside on a dense open subset $U \subset S$; so $\mathcal{L} \vert_U= \mathcal{N} \vert _U$.
Why does this already imply that $\mathcal{L}=\mathcal{N}$on whole $S$?
My considerations: Since $\mathcal{L} \otimes \mathcal{N}^{\vee}$ is also invertible and therefore wlog $\mathcal{L}= O_S$.
Assume that $\mathcal{N} \vert_U= O_U$. How does this equality extend to whole $S$?
My ideas: for every $U \subset V$ we have diagram
$$ \require{AMScd} \begin{CD} O_S(V) @>{a_V???} >> \mathcal{N} \vert_V \\ @VVcanV @VVcanV \\ O_S(U) @>{\cong}>> \mathcal{N} \vert_U; \end{CD} $$
and we want that this diagram extends to $a_V$ and futhermore it is an isomorphism. From here I'm stuck. How to use here the normality condition to obtain the desired result?