Unlike other commands in the database, you can't make or reference a schema inside of a database that isn't the one that your session is attached to. Repro:
root@127.0.0.1:63131/defaultdb> create schema foo;
CREATE SCHEMA
Server Execution Time: 2.667ms
Network Latency: 28.512ms
root@127.0.0.1:63131/defaultdb> create schema otherdb.foo;
invalid syntax: statement ignored: at or near ".": syntax error
SQLSTATE: 42601
DETAIL: source SQL:
create schema otherdb.foo
I'd expect that the latter statement work okay. This is also a problem for every other command that references a schema, such as ALTER TABLE SET SCHEMA, ALTER SCHEMA, DROP SCHEMA, etc.