When you regress the observed $y$ values onto the fitted $\hat y$ values, you're replacing the original independent variable $x$ with a new independent variable, namely $\hat y$. So if we label these new independent variables $z_i$: $$ z_i:=\hat y_i := \hat\beta_0 +\hat\beta_1 x_i $$ then the mean $z$ value is $ \bar z=\hat\beta_0 +\hat\beta_1\bar x $ and the deviation of $z_i$ from its mean is $z_i-\bar z=\hat\beta_1(x_i-\bar x)$. Therefore your formula for the slope of the new regression line gives $$ \frac{\sum(y_i-\bar y)(z_i-\bar z)}{\sum(z_i-\bar z)^2}= \frac{\sum(y_i-\bar y)\hat\beta_1(x_i-\bar x)}{\sum\hat\beta_1^2(x_i-\bar x)^2}=\frac1{\hat\beta_1}\frac{\sum(y_i-\bar y)(x_i-\bar x)}{\sum(x_i-\bar x)^2}=\frac1{\hat\beta_1}\hat\beta_1 =1. $$