Hey man, I was actually looking for a similar answer. I have a similar situation where I would like to build one full test run that works in both development and preprod environments. My issue is that the application and its functionalities are VERY dependent on Accounts, users, permissions etc... with the two environments using different databases, this was a problem.
What I have settled on for now is keeping my user information in the configuration file, rather than a constants file of some sort. Cypress allows you to have multiple .config files, and you can dictate which one to use when you run your tests. So when I need to do testing in the dev environment, I use cypress.config.js, and when I need to test in preprod I use cypress-preprod.config.js.
When you open cypress from the CLI you can tell it which config to use:
cypress open --e2e --browser chrome --config-file cypress/configs/cypress-preprod.config.js
Throughout my tests when I need to access a workflow that is user dependent I call Cypress.config("configpropertyname"). So in my case I end up calling things like Cypress.config("users").permissionTestUser.username and Cypress.config("users").permissionTestUser.id a lot for example. It is quite a bit to set up if you have a giant suite of tests already, but it works. Unless someone else has a simpler way to configure for different environments this is what I am going with!