What gets persisted is determined by the 'viewoptions'
setting. Unfortunately, there's no separate configuration value for the local working directory. It seems that Vim always adds the :lcd
command when you've set a local one.
To work around this, either avoid creating views for windows that currently have a window-local directory, or you could post-process the generated view script to remove / comment out the :lcd
line. The session.vim plugins uses that approach for session files.