For a multiple libref join to pass to Spark, all of these components of the LIBNAME statements must match exactly.
You can use the SQL pass-through facility to pass a cross-schema join to Spark. For more information, see Passing Joins to the DBMS.