Let's understand this with the help of an example:
We know that the area of the circle is given by pi r^2 and its dimension is L2. But if we write the equation of the area of the circle as 2pi r^2, it's dimension will also be equal to L2. But 2pi r^2 is not the correct formula for the area of the circle. So, we can say that a dimensionally correct equation may or may not be correct.