Spotlight in Finder window isn't finding files in the current folder
I have a MacBook Pro M2 with Ventura 13.4.1, and I started this machine from a Time Machine migration of my previous Mac. I notice that when I use Spotlight from a Finder window to search for a file, it will find the file in "This Mac" but if I switch to the current folder (selecting the name of the folder which is shown next to the "This Mac" option), the result is always empty even if the file is definitely there (and shown in the list with the "This Mac" scenario). I saw a similar issue reported at Spotlight search does not return results … - Apple Community but none of the proposed solutions there helped. I don't think this can be an indexing issue since Spotlight is quite successful at finding the files quickly when I'm searching the whole system.
MacBook Pro 16″, macOS 13.4