pg_restore showing errors when specifying schema when backing up with pg_dump
As Postgres does exports with if exists in both commands, but you can make the database be dropped before inserting the backup
use
When you create the dump
-c
--clean


Output commands to clean (drop) database objects prior to outputting the commands for creating them. (Unless --if-exists is also specified, restore might generate some harmless error messages, if any objects were not present in the destination database.)


This option is only meaningful for the plain-text format. For the archive formats, you can specify the option when you call pg_restore.

The same exists for the pg_restore, but if you used it in pg_dump you don't need it here
-c
--clean


Clean (drop) database objects before recreating them. (Unless --if-exists is used, this might generate some harmless error messages, if any objects were not present in the destination database.)