Remember that A, B, and C come from the normal too. So negating the normal flips the sign of all four terms, making:

$$begin{align}

(-A) x + (- B) y + (- C) z + (- D) &= 0\

(-1)(Ax + By + Cz + D) &= 0\

(-1) times (-1)(Ax + By + Cz + D) &= (-1) times 0\

Ax + By + Cz + D &= 0

end{align}$$

So you can see, negating the normal still gives us an equivalent equation, with all the same solutions as the original. Whether we start with $vec n = (A, B, C)$ or $vec n = (-A, -B, -C)$ does not alter the plane equation in any way that matters.

The direction of the normal can matter for lighting, or whether you consider the triangle “front facing” for your purposes, but does not change anything about the math for detecting the intersection.

The resource you’re using contains an error, though. if $ vec n = (A, B, C)$ is the plane normal, then $D = – vec n cdot vec p$ for a point $vec p$ in the plane. The article you linked neglects that minus sign.

Another way of thinking of this: if your normal is a unit vector, then $D$ is a *signed distance* from the plane to the origin, along the direction of the normal. If the normal points toward the origin, this signed distance is measured in the same direction as the normal, and gives a positive value. If the normal points away from the origin, then this distance is measured in the direction opposite the normal, and gives a negative value.

Meanwhile, $Ax + By + Cz$ measures a signed distance from the origin to the plane perpendicular to $(A, B, C)$ containing the point $(x, y, z)$.

Since the “from” and “to” are flipped between these two parts, the two values will have the same magnitude but opposite sign for any $(x, y, z)$ on the plane, cancelling out to the zero on the right hand side.

(If the normal is not a unit vector, the same argument applies, except now we’re dealing with a scaled distance – like we measured it with a different choice of units)