@rui dias please go through this link
https://learn.microsoft.com/en-us/azure/app-service/faq-availability-performance-application-issues#why-does-my-request-time-out-after-230-seconds-
As documented, web app internally uses Azure Load Balancer that has a default idle timeout setting of four minutes. This is generally a reasonable response time limit for a web request. If your web app requires longer processing then it is advisable to make it asynchronous by using a Queue for example. And then execute the request using Azure functions. This is well described in this pattern https://learn.microsoft.com/en-us/azure/architecture/patterns/async-request-reply
The other way to overcome this limit is to use Azure Durable Function instead of Web App.