Replication throw an error after failover mirror partner is down in SQL Server
This should work as it did for me:

Set the -failoverpartner using the mirror name in the sql agents for replication.
Fail mirror over to secondary

Make sure replication continues to send commands to subscriber.

Remove mirroring so primary is no longer connected.

Go to distributor, add an alias (sql server alias)
The alias should be the old principal name pointing to the secondary server.

Replication will continue without errors, however jobs (and replication monitor) will show everything under the primary mirror server.