I faced same issue. Please refer
https://learn.microsoft.com/en-us/azure/azure-sql/database/firewall-configure#connections-from-inside-azure
When an application from Azure tries to connect to the server, the firewall checks that Azure connections are allowed by verifying this firewall rule exists. This can be turned on directly from the Azure portal blade by switching the Allow Azure Services and resources to access this server to ON in the Firewalls and virtual networks settings