Does pg_restore continue after internet connection got lost
pg_restore keeps executing SQL statements on the server. If the connection to the server fails, the restore was not successful.
What is strange here is that there should not be any long idle times in the connection, with the possible exception of creating indexes and refreshing materialized views.
At any rate, you should see that the network gets configured properly. You cannot really work with an unreliable network like that that drops your connection as soon as you turn your back.