Suppose, $p$ is a real negative number. However, $p^2$ is positive. Now,
$$\ln(p^2) = 2 \ln(p)\tag{1}$$
Question:
- Is $(1)$ valid to write?
Suppose, $p$ is a real negative number. However, $p^2$ is positive. Now,
$$\ln(p^2) = 2 \ln(p)\tag{1}$$
Question:
No!
For exactly the reason you mention.
However, for $p\in\mathbb{R}$, $p\neq 0$, it is correct to write $\ln(p^2) = 2\ln(|p|)$.