that option will not search within Photos as they are held inside the Photos application,
The photos are not inside the Photos application, but the Photos library. My screenshot is showing the CR2 files inside the Photos library and the search found them inside the package.
If you add "System Files are Included" to the constraints of the search, the inside of packages will also be searched, as you can see from the path in the screenshot below:

To add "System files are included", click the "+" button. hen select "Other", and in the "Other" list "System Files".
Another way to search inside a package is to start the search from inside the package. Ctrl-click your library, select "Show package contents", select the "Masters" folder, and start the search from the Finder window of the "Masters" folder.