Here’s further clarification. There are several Rhat versions. As the diagnostic presented in Gelman and Rubin (1992) has changed substantially, the later versions should not be called Gelman-Rubin diagnostic. The versions I know are
v1 Gelman & Rubin, 1992
v2 Brooks & Gelman, 1998 (fix)
v3 BDA2, Gelman et al., 2003 (simplification)
v4 BDA3, Gelman et al., 2013 (split + connection to ESS)
v5 Vehtari et al., 2021 (rank normalization, folding, and much more details on connection to ESS)
@jonah linked to RStan code where Rhat() is using v5 and rhat_fun() is using v3. CmdStan and CmdStanR are displaying Rhat v5. posterior R package has both v4 rhat_basic() and v5 rhat() (and an internal function .rhat() is v3).