Preserve password hashes when migrating to another server

No, the site URL and other options are not a factor in password generation in vanilla WP.

In particular, this is the file that does the hash generation:

https://github.com/WordPress/WordPress/blob/master/wp-includes/class-phpass.php

The only way the site URL impacts the password hash, is if you’ve used the filters to make it that way. Perhaps a plugin does this, but this would be very extremely unusual and rare, and most likely a plugin that claims to improve security.