Let $\gamma: [0, 1] \to \mathbb{C}$ be a (continuous) path, $\gamma(0) \in D$, $(f, D)$ a tuple of a holomorphic function $f: D \to \mathbb{C}, D \subseteq \mathbb{C}$ a simply connected open set. Let $(\tilde{f}, \tilde{D})$ be a holomorphic continuation of $(f, D)$ through some $(f_i, D_i)$'s along $\gamma$ (that is, the image of $\gamma$ is contained in the union of the $D_i$'s, and $\tilde{f}: \tilde{D} = D \cup \bigcup_{i} D_i \to \mathbb{C}$ is holomorphic, and $\tilde{f}|_D = f$), and let $f_i(D_i) \subseteq G$ for a (simply connected) domain $G$.
Also, let $h: G \to \mathbb{C}$ be analytic and have the property $h \circ f = id_D$.
I now want to prove that $h \circ \tilde{f}$ is the identity on $\tilde{D}$.
I'm not entirely sure how to approach this. I know that for a holomorphic function in $\mathbb{C}$, if we know a few values it takes (like on a cluster point), it's often already determined how this function looks on the rest of $\mathbb{C}$. So I would expect that we can somehow use this here to iteratively proof that $h \circ f_i = id_{D_i}$ for all the $i$'s. I don't really know how to formally show that.
In each of the connected open sets $D_i$ and in $D$, the function $h\circ \tilde f-\operatorname{id}$ can only have a discrete set of zeroes or be identically zero. But we already know that it is zero on an initial segment of $\gamma$, hence on all of $\gamma$, henec in each $D_i$.