Proof (monodromy theorem for analytic continuation)
Let $π: R_\mathcal{F}\to \C$ be the associated Riemann surface. Consider the local homeomorphism $π|_{π\inv(U)}: π\inv(U)\to U$.
For $δ$ a path in $U$ starting at $a$, because $(f,D)$ can be analytically continued along $δ$, there is a lift of $δ$ to $π\inv(U)\subseteq R_\mathcal{F}$ starting at $[(a, f)]\in [f,D]$. Therefore by the monodromy theorem, the lifts $\tilde γ_1, \tilde γ_2: [0,1]\to π\inv(U) \subseteq R_\mathcal{F}$ are homotopic as paths.
In particular their endpoints agree: $[(b, g_1)] = \tilde γ_1(1) = \tilde γ_2(1) = [(b,g_2)]$. As $g_1$ and $g_2$ agree on a neighbourhood of $b$ and $E$ is their common domain, $g_1 = g_2$.