"azure_pg_admi" is not the highest level role in Azure PosetgreSQL Database.
Superuser Role: A superuser role in PostgreSQL has unrestricted access to all aspects of the database and can perform any action (including the ability to alter server-level configurations, manage all roles (including granting superuser privileges), and bypass all security checks).
Admin(azure_pg_admi) Role: Even though it’s an admin role, it is not the same as a PostgreSQL Superuser and has some restrictions. It lacks true superuser access and is restricted from certain system-level configurations and internal functions that a superuser can manage.
Since the "azure_pg_admi" role does not have superuser privileges, this is why you're encountering permission issues when trying to modify ownership of a database or perform other administrative tasks.
A superuser role is required to change database ownership or perform certain other high-level operations in PostgreSQL.
In Azure Database for PostgreSQL (which is a managed service), superuser access is not granted to customers under normal circumstances. Azure maintains tight control over the server-level operations and infrastructure to ensure security, stability, and consistency of the service. In reference to this, you can also check the Microsoft documentation that I've attached where this is clearly mentioned:
https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-create-users