Have you tried this? https://techcommunity.microsoft.com/blog/adforpostgresql/online-migration-to-postgresql-flexible-server-on-azure-from-single-server/4086503.
Azure’s online migration service for PostgreSQL Flexible Server, which supports continuous replication and a controlled cutover for minimal downtime and data consistency. Plan and test the migration, monitor replication, and ensure all writes are stopped before final cutover to achieve near-zero downtime