Using `:w!` in vim is similar to the following:
echo 'test' > sess.vim.temp
mv sess.vim.temp sess.vim
The `mv` commands only cares about the directory permissions, the permissions of the file are not relevant. This is because you are modifying the directory, not writing to the file. To accomplish your goal, you will also need to adjust the permissions of the directory the file resides in.