Search only in entries with own urls checked
Got this solution from Andrew Welch/nystudio107 over on Discord:

Query for ':notempty:' in the URI, for example:

craft.entries().uri(':notempty:').all()


Docs: ':empty:' and ':notempty:'