Regarding this method of proving the Law of Cosine:

It is noted on that page that
This proof isn't perfect. We should have been worried about angles. This can be avoided by using directed angles.
I don't understand why we need to worry about the angles, as throughout high school, I have always been treating both the angles and the lengths of the sides as scalar quantities.
When $\pi/2 < \alpha < \pi$, we have an obtuse angle at $A$ and we must consider the geometry of the figure accordingly.
The altitude $h$ from $B$ to $AC$ is no longer "inside" the triangle. It extends to some point, say $B'$, on the line containing $AC$ such that $|B'C| > |AC|$; in other words, the signed distance $r$ would need to be negative and $b-r > b$. That said, the relationship $$r = c \cos \alpha$$ does take this into account, since when $\pi/2 < \alpha < \pi$, $-1 < \cos \alpha < 0$, consequently $-c < r < 0$.
You can also see this in the final identity $$a^2 = b^2 + c^2 - 2bc \cos \alpha,$$ since again, when $\cos \alpha < 0$, the RHS exceeds $b^2 + c^2$, which is what we would have if $\alpha$ were a right angle. If we think of $b$ and $c$ as fixed and $\alpha$ allowed to vary continuously from $0$ to $\pi$, you would find that the length of $a$ increases from $0$ to $b+c$.