For packaging the sources of Azure Functions, follow the instructions on Packaging .NET sources.
Set the Package Type property to "Sources".

After the packaging has finished, you have to build the sources the following way (positioned at the src\build directory)
dotnet build <Mydeployment>.sln -c release --force -p:DebugType=none --p:OutputPath=<outputh_path> -p:CosmosDBSupport= -p:TimerSupport= -p:AzureQueueSupport= -p:ServiceBusSupport= -p:HttpSupport= -p:BlobSupport= -p:EventGridSupport= -p:IntegratedSecuritySupport=
You have to pass the values of CosmosDBSupport, TimerSupport, etc according to the Azure Function's trigger type.
Since GeneXus 18 Upgrade 13