@RTAYLI Oumaima Thanks for reaching out. Can you please confirm if you are running in-process model for your function app. If this is the case that this is a limitation of the in-proc model in V4 running on .NET 6/7 as per the discussion here.
The recommendation, if this is a requirement, is to move to the Isolated Model, where .NET dependencies are not restricted/unified.