Are you willing to sign up for "maintaining" PostgreSQL in your environment, INCLUDING things like patching, finding and fixing bugs, upgrades, backup and recovery, and off-hours support?
Azure's Postgresql managed database handles all that (except off-hours support) for you, and there's much less off-hours support required (at least there was with AWS RDS Postgresql, so pressuming so with Azure, too).
Of course, OP just mentioned an Azure VM, so he'd have to do all that himself.
Using the Azure Postgresql managed database still means you'll have to think about archiving data, and properly configuring PG (mainly autovacuum parameters).