The results will matchif you also perform this residualizing procedure on the predictor E (regressing E on the other covariates) and then look at the association of these two sets of residuals.in a sense

I say "in a sense" because technically what will match here is that the slope from (1) the regression of Xres on Eres will match the slope associated with E in (2) the regression of X on all the predictors. (This result is known as the Frisch–Waugh–Lovell theorem.) Because the denominator degrees of freedom are slightly different in these two cases, the t-statistics and p-values will be very slightly different, but quite close.

There will also be an equivalence between the simple correlation coefficient in (1) and the partial correlation coefficient in (2). Although again the p-value will differ slightly as mentioned above.

There will not generally be any sort of equivalence between thecorrelationcoefficient and theregressioncoefficient, as you thought there might be -- I'm not really clear on why you thought those two thing would be equal.