I think you can either have the memory on or off but according to the docs the projects have their own separate memory so it wont leak across the projects or from non-project chats:
"Each project has its own separate memory space and dedicated project summary, so the context within each of your projects is focused, relevant, and separate from other projects or non-project chats."
"Each project has its own separate memory space and dedicated project summary, so the context within each of your projects is focused, relevant, and separate from other projects or non-project chats."
https://support.claude.com/en/articles/11817273-using-claude...