Leaving this value set interfered with the CreateWallet test if it happened to execute later in the test ordering. Specifically it would cause CreateWallet test to write data to the current directory instead of temporary test directory.
This is a backport of core#20932 [1/2]
https://github.com/bitcoin/bitcoin/pull/20932/commits/66576c4fd532ac18b8b355ea93d25581a2c15654
Depends on D11969