Thanks. The reason I'm asking is current server is Windows 2016 and new server will be Windows 2019. So not just sql server version change but also OS version change.
This should be fine -- one caveat is that the publishing server *must* be at least Standard Edition. Web edition does not support publication for replication/mirroring.