
According to this
Only superusers can change this setting.
If you try with any other instead of superuser then you may get above error. But According to the MS document
super user is not accessible is not accessible in azure PostgreSQL - Flexible Server. You can enable log_statement server parameter by following below procedure:
Go to Server parameters search for log_statement select the required value as shown below:

After Selecting the value save the changes by clicking on Save. Then you can view the logs in monitoring section. For more information you can refer to the MS document.