Good day Asiful Nobel,
I am pretty sure (guessing) that the issue is related to the Azure function and not the database, but from the database side here are some points which might (low chance) provide some insights
(1) In general any connection has latency of the connection itself (for example the authentication procedure)
(2) Azure SQL database has option to use Serverless tier. In this case, Compute resources are auto-scaled. The chance that this is your issue is extremely low but scaling has latency and in theory if your function lead to scaling of the database then you might get delay.
(3) Azure SQL database like any other transaction based database, can have locked and waits - In very very simple words, this mean that one query need to wait to another query which uses the same resources (for example two queries which try to update the same row at the same time).
My guess is that you need to focus on the Azure function
Note: If the issue related to the DATABASE then we will need a lot more information and to monitor the database