Camunda query with tenant

Hi,

i have a question regarding how Camunda makes its queries. I have a Camunda instance started with tenant A. Now i start another instance with tenant B. Beeing in the execution with tenant B I make a query like this runtimeService
.createVariableInstanceQuery()
.processInstanceIdIn(Id fron instance with tenant A)
.variableNameIn(a variable name)
.list();
This query gives me null. So my question is: How does Camunda make this query? It searches for a process instance in all instances but sees that i am tenant B so i am not allowed to have a variable from an instance with tenant A? Or it only searches instances with the same tenant, tenant B? Thanks so much for your responses
What if i have a tenantless execution and i make a query to fina a instance id with a tenant A?

Within the Java API there is “.tenantIdIn( tenantId )” for queries.

this.runtimeService.createVariableInstanceQuery().processInstanceIdIn( task.getProcessInstanceId() ).variableScopeIdIn( task.getProcessInstanceId() ).disableBinaryFetching().disableCustomObjectDeserialization().list()