5. As shown in the figure, $M, N$ are moving points on the two legs of the right triangle $\triangle A B C$, and $P$ is the midpoint of the line segment $M N$. Which of the following conclusions is correct?
A. When the area of $\triangle A M N$ is a constant, the trajectory of point $P$ is one branch of a hyperbola
B. When $|M N|$ is a constant, the trajectory of point $P$ is an arc of a circle
C. When $|A M|+|A N|$ is a constant, the trajectory of point $P$ is a line segment without endpoints
D. When the perimeter of $\triangle A M N$ is a constant, the trajectory of point $P$ is a parabola
Let $P(x, y)$, then $N(2 x, 0), N(0,2 y)$. For option $A$, $S_{\triangle A M N}=2 x y=2 k \Rightarrow x y=k$, the trajectory of point $P$ is one branch of a hyperbola, correct;
For option $B$, $|M N|=2 \sqrt{x^{2}+y^{2}}=2 m \Rightarrow x^{2}+y^{2}=m^{2}$, correct;
For option $C$, $|A M|+|A N|=2(x+y)=2 a \Rightarrow x+y=a$, correct;
For option $D$, $l_{\triangle A M N}=2 x+2 y+2 \sqrt{x^{2}+y^{2}}=2 p \Rightarrow \sqrt{x^{2}+y^{2}}=p-x-y$
$\Rightarrow 2 x y-2 p x-2 p y+p^{2}=0 \Rightarrow(x-p)(y-p)=\frac{p^{2}}{2}$, the trajectory of point $P$ is one branch of a hyperbola, incorrect.
In summary, the correct choices are $A, B, C$.