Square inscribed in a right triangle problem

Expanding upon my comment ...

In fact, the semicircle and even half the elements of $\triangle ABC$ are irrelevant to the result. All that really matters is that $\square MNPQ$ is a square ---any square (barring degeneracies)--- such that $\overline{MN}\parallel\overline{BC}$. The construction's fixed point, which you have keenly observed is the midpoint of the semicircle, is, more simply, the center of a square erected upon $\overline{BC}$. (Below, we resolve the ambiguity of which of two candidate squares is meant.)

enter image description here

The parallelism condition guarantees $\triangle DBC\sim\triangle DNM$, so that $|DB|/|DN|=|DC|/|DM|$, making $D$ the center of a dilation/homothety that carries $N$ to $B$ (which my figure also denotes $N'$) and carries $M$ to $C=M'$. Necessarily, the dilated images $P'$ and $Q'$ of $P$ and $Q$ complete square $\square M'N'P'Q'$ as the dilated image of $\square MNPQ$. (Note: The fact that the squares have opposite orientations resolves the ambiguity mentioned above.) Thus also, the dilation carries center $E$ of one square to center $F=E'$ of the other; since a point and its dilated image are collinear with the center of dilation, we are done. $\square$