Generally, the SQL file supplied to ALTER DATABASE SCHEMA FROM FILE would represent the schema that you want the remote to use. Is there a reason that the publication and sync profile need to be dropped after that ALTER?
The IF EXISTS was added to the DROP statements in v12. An example statement is:
DROP PUBLICATION IF EXISTS p;