TITLE: modulus-related analytic functions
QUESTION [7 upvotes]: Let $D\subset\mathbb{C}$ be the open unit disk. Suppose $f,g,F,G:D\rightarrow\mathbb{C}$ are analytic functions linked by 
$$\vert f(z)\vert^2+\vert g(z)\vert^2=\vert F(z)\vert^2+\vert G(z)\vert^2; \qquad \forall z\in D.$$

Question 1. If $f\neq \alpha g$ and $g\neq\beta f$ for any $\alpha, \beta\in\mathbb{C}$ then is the same true for $F$ and $G$?

Caveat. Not true for real analytic functions: 
take $f=\sin x, \,g=\cos x, \, F=\frac1{\sqrt{2}}=G$.
EDIT. Encouraged by Christian's positive answer, let's upgrade the problem.

Question 2. Suppose $f, g, h$ are linearly independent (over $\mathbb{C}$) such that 
  $$\vert f\vert^2+\vert g\vert^2+\vert h\vert^2=\vert F\vert^2+\vert G\vert^2+\vert H\vert^2.$$
  Should $F, G, H$ be linearly independent, too?

REPLY [2 votes]: In fact, more is true. If $f_j$ are linearly independent and $F_i$ are
linearly independent, and
$$\sum_{j=1}^n|f_j|^2=\sum_{i=1}^m|F_i|^2,$$
then $m=n$ and $F_i$ are obtained from $g_i$ by a unitary transformation.
See, for example,  https://arxiv.org/pdf/math/0007030.pdf, section 3. This is called the "Calabi rigidity".