I'm running 3.148.3 selfhosted and I frequently run into components being not is scope of the query, although both the query and the component are on the same page.
It happens after changing the page name.
So I've created the query, changed the page name, added the component and then updated the query to reference the component value.
I've noticed that the componentname could not be resolved while typing it, so I complete typed it myself without autocomplete. Then after hitting Run, I'm getting the error below.
After a page refresh it is working again and the component is in scope.