(Some of the path variables have changed just recently as told in System variables and Windows nightly installer change. Notice that the variables are for all platforms, not just Windows, although the Installer part of the announcement was naturally only for Windows.)
This is how it works:
When initializing KiCad first sets the config dir using some sane defaults. Then it reads KICAD_CONFIG_HOME from the real environment if it exists. It then overrides the default config dir with the value of KICAD_CONFIG_HOME. Only after that is the configuration opened (or new one created if it doesn’t exist yet). Path variables are read from the configuration. The original KICAD_CONFIG_HOME isn’t available in these variables, nor is it stored there.
You can define and store another KICAD_CONFIG_HOME inside KiCad but it isn’t used as the configuration location. The environment variable was read from the real environment and used once when KiCad started. Therefore it doesn’t have any effect later; the configuration location is stored inside running KiCad and isn’t changed anymore while running, not even when reading the path variables from the configuration.
I just tried setting external environment variable KICAD_CONFIG_HOME and it worked OK on Linux.
You can see how the variable is used in https://gitlab.com/kicad/code/kicad/-/blob/master/common/settings/settings_manager.cpp. The settings manager has GetUserSettingsPath() and calculateUserSettingsPath(…). The latter is run once per session.
If KiCad doesn’t expose GetUserSettingsPath you can implement it in python, it’s not too complicated.