It is well known that if $f(z)$ and $g(z)$ are both holomorphic on a (path-)connected open set $C$ and $\lvert f(z)\rvert=\lvert g(z)\rvert$ on $C$ then $f(z)=cg(z)$ on $C$ for some constant $c$. Do we have a robust version of this theorem like the following?

> Suppose for simplicity $C$ is the unit disk and $\operatorname{dist}$ is some distance measure such as L2-distance. If $d=\operatorname{dist}_C(\lvert f\rvert,\lvert g\rvert)$ is small then $d'=\operatorname{dist}_{C}(f,cg)$ is also small for some $c$. 

**Update.** Furthermore, are we able to upper bound $d'$ by $d^{O(1)}$?

Any relevant information will be greatly appreciated!