In the Azure Functions landscape, we have Durable Functions. Usually, this is used for stateful functions. But also can be used for scenarios where your code may take more time than the allotted 10min.
You can read about Durable Functions here: https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp
Here is a tutorial to create Durable Function in Python: https://learn.microsoft.com/en-us/azure/azure-functions/durable/quickstart-python-vscode
Hope this helps.