Hi @Heisenberg ,
Quote from MS official document;
SQL Server supports upgrading replicated databases from previous versions of SQL Server; it is not required to stop activity at other nodes while a node is being upgraded.
Run the Log Reader Agent for Transactional Replication Before Upgrade
Before you upgrade SQL Server, you must make sure that all committed transactions from published tables have been processed by the Log Reader Agent.To make sure that all transactions have been processed, perform the following steps for each database that contains transactional publications:
1.Make sure that the Log Reader Agent is running for the database. By default, the agent runs continuously.
2.Stop user activity on published tables.
3.Allow time for the Log Reader Agent to copy transactions to the distribution database, and then stop the agent.
4.Execute sp_replcmds to verify that all transactions have been processed. The result set from this procedure should be empty.
5.Execute sp_replflush to close the connection from sp_replcmds.
6.Perform the server upgrade to the latest version of SQL Server.
7.Restart SQL Server Agent and the Log Reader Agent if they do not start automatically after the upgrade.
In-place upgrade
1.Upgrade the Distributor.
2.Upgrade the Publisher and the Subscriber. These can be upgraded in any order.
Please read the MS official document to get more detail notes about upgrade SQL in replication environment.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".