This is not a bug, but simply the semantics of the query language. The from clause has separate “spaces” which are separated syntactically by a comma. Every such “space” is isolated. If you want to be able to refer to aliases of other root nodes, then you will have to use a cross join instead.
entityManager.createQuery("""
select r.name, u.someValue, oe.id
from RootEntity r
cross join OtherEntity oe
left join UnrelatedEntity u on u.name = r.name
""").getResultList();