How to filter out two or more folders in graph view

I’m trying to use the search functionality to exclude multiple folders from the graph view. The name of the two folders I want to exclude are “daily” and “BonusTopics” which is inside another folder called “Topics”. I enter the following search criterion:

(path: -“Daily”) AND (path: -“BonusTopics”)

But this causes a whole bunch of notes that aren’t in either of those folders to also get filtered out. Am I missing something or is this a bug?