The behavior when GnuPG adds the keygrip to the output of a keylisting changed in version 2.2.19 and was always not really defined if "--with-keygrip" is not explicitly requested. See: T4820
Since --with-keygrip requires extra calculations it should be explict like "--with-signatures" etc. and a Keylist option.