@Ahmed Elharouny Thanks for your patience on this.
As mentioned in the documentation here Managed Functions on Static web Apps supports python version>=3.8. I would suggest you migrate you managed function code from python 3.6 to python 3.8 and check.