I only found this once you'd identified where in lib/moodlelib.php the problem stemmed from, using git blame lib/moodlelib.php I could see a recent change (June 2020) in this section of code:
3a4f0a34f5eb (tjhunt 2008-09-23 05:18:42 +0000 9288) // This will happen, for example, before just after the upgrade, as the
3a4f0a34f5eb (tjhunt 2008-09-23 05:18:42 +0000 9289) // user is redirected to the admin screen.
b02b1f3ea98e (Charles Fulton 2020-06-16 16:34:21 -0400 9290) $variablestoskip = GETREMOTEADDR_SKIP_DEFAULT;
3a4f0a34f5eb (tjhunt 2008-09-23 05:18:42 +0000 9291) } else {
So I ran git log b02b1f3ea98e to see the commit message for that change:
commit b02b1f3ea98e718cc775ba516e8971dbd688ccae
Author: Charles Fulton <XXX@XXX.XXX>
Date: Tue Jun 16 16:34:21 2020 -0400
MDL-69074 admin: ensure consistent default for getremoteaddrconf
Then I looked up MDL-69074 in the Tracker which listed MDL-69562 as a regression under Issue Links.
Apologies if you already knew this, I thought it was useful to share.