Are you using Turbo repo?
Update your turbo.json file with env vars that you want to expose for specific tasks. For Sanity studio, most likely your build task.
https://turborepo.com/docs/crafting-your-repository/using-environment-variables