Unless it's a careless mistake, these two cells appear to me to be equivalent. The only difference is, in the first cell, an argument is explicit as opposed to a previously defined name in the second cell. Using Evaluate[] and/or ReleaseHold[] on every possible argument in the explicit example doesn't change the cell's output. I think the second result is the correct one. Using the default lexicographic monomial order, I think the remainder of f divided by the Groebner basis is 2z. As of 18 Oct. 2021, 119 people had viewed this with no reply, which is unusual in my limited experience.