Confusion in precision rectifier
You are confusing the output of circuit with output of opamp, they are not the same thing.

An ideal opamp output does whatever it needs in order to keep opamp input voltages equal via feedback.

So in this case the circuit Vout is same as opamp inverting input, and circuit Vin is opamp noninverting input. Thus Vout equal Vin, and opamp output is Vout+Vd.

It would be invalid circuit to short the resistance to ground. Inverting input and Vout would be ground because of the short. For any positive voltage Vin, the opamp output cannot set the inverting input no matter what, not even with infinite output current via diode to the ground shorted node.