Hello Bic076,
The obvious way to have an independent Windows password is to switch to a local account via Settings > Accounts > Your info > Sign in with a local account instead.
That said, I'd like to understand your concern about losing registry data and environment variables a bit better — did you read this somewhere, or did you experience it firsthand?
To my knowledge, switching via Settings keeps you on the exact same user profile folder (typically C:\Users\YourName). The process reuses your existing profile and the associated NTUSER.DAT registry hive, which stores your HKEY_CURRENT_USER (HKCU) settings — including all custom registry keys, user-specific configurations, and environment variables stored under HKCU\Environment. No new profile is created, and your local customizations, files, applications, and settings should remain fully intact.
If you have a specific source or experience that suggests otherwise, feel free to share — I'm happy to look into it further.