'<QueryOptions>' +
'<IncludeAttachmentUrls>TRUE</IncludeAttachmentUrls>' +
'<ViewAttributes Scope="RecursiveAll" />' +
'</QueryOptions>';
To search inside subfolders, you need to set the scope property from queryOptions to "Recursive All".
Sample snippet:
'<QueryOptions>' +
'<IncludeAttachmentUrls>TRUE</IncludeAttachmentUrls>' +
'<ViewAttributes Scope="RecursiveAll" />' +
'</QueryOptions>';
When a where clause is present, the viewName value is ignored by List.getItemsWithOptions and only the CAML query is used to filter content.