renderUpgradeEnv still wrote the .env with godotenv.Marshal, which turns
any value that parses as an integer into its canonical form. A password
such as 0123 was rewritten as 123 on upgrade, the same bug #14180 fixed
for install. Use the env package marshaller, and escape $ inside double
quotes there so values containing both $ and a quote still read back
unchanged.