I recently found out that there are some situations where we can not use $R^2$ to compare goodness of fit between two regression models.
Let
$\begin{aligned}Y &= \beta_1 X_1 + \beta_2 X_2 + u \\ \ln(Y) &= \beta_1 X_1 + \beta_2 X_2\end{aligned}$
be two regressions. I want to compare these two by looking at their $R^2$. At first glance I thought that since $R^2$ explains us how close the explained variation is to the total variation, it could be a good way of comparing models. But for some reason I can not use $R^2$ in this case because their "ESS" are different. I didn't get why that's a reason.