A selector that works in the inspector can return nothing in the console when the element sits inside a web component. Firefox has an extra helper for those cases.
The Web Console in Firefox has three selector helpers. $(selector, element) returns the first matching node, like document.querySelector(). $$(selector, element) returns an array of all matching nodes, where the docs point out that it is an array instead of a NodeList. And $$$(selector, element) works like $$ but also searches the shadow DOM.
$$$('button')
The second argument is optional and defaults to document, so you can start in a certain subtree:
$$$('input', $('my-widget'))
Because the result is a real array, you can use the usual array methods on it, such as map or filter, without converting anything first:
$$$('a').map(a => a.href)
A few neighbours are worth knowing. $0 is the element you currently inspect, and $_ stores the result of the last expression. copy(value) copies a string as it is, the outerHTML of a DOM node, or other values through JSON.stringify.
These helpers belong to the DevTools console. They are not part of the web platform, so the same code in a script on your page throws an error. Use querySelectorAll there, and reach into a shadow root through element.shadowRoot yourself.
Further reading: Firefox Source Docs: Web Console helpers