Duplicate http/https topics are randomly created

Are you sure you have force HTTPS set in your site settings on the target Discourse? That is absolutely required.