Why doesn't this operation work?

They are the same because $$\ln|2x+1|=\ln|2(x+1/2)|=\ln(2)+\ln|x+1/2|$$ and the constant $\ln(2)$ goes with the constant $C$.