Problem with .env files / Cache

Am I doing something wrong?
For some time now, I have had a problem with refreshing values defined in .env files – both in VSC and Cursor. I uninstalled all Python plugins, including the Microsoft Python Debugger…
Still, often after changing data in the file, the applications see old values. Restarting the IDE, Terminal, etc., does not help… clearing the workspace cache does help. Where is the .env cached, why, and is there any simpler solution to this problem than clearing the cache?

The second problem – the models still stubbornly claim that there is no .env* file in the project, even though it is (standard) hidden in .gitignore – I know a workaround is to add information about it in the Chat settings, but it doesn’t always work and sometimes the agent overwrites data in the .env, which it should not have permission to do.
I wonder how to give the agent access to the .env while not exposing sensitive data.