After downtime starts, update pg_hba.conf and reload the configuration to prevent writes in Azure.
As an additional move to control the procedure and ensure that everything is write, it is worth to completely forbid writing to Azure master once the maintenance window begins.
Simple and highly reliable way to forbid writes is to edit pg_hba.conf, forbidding all connections and reloading the server.