@KrishnarajPoojary07388 Thanks for reaching out. I have reviewed the logs of the function app (that you have shared in stack overflow) and I am able to see the swap operation is failing due to Appinit
module service unavailable. Could you please check whether [Application Initialization] (https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-application-initialization) is enabled or not. If yes, could you, please follow [these documented steps] (https://ruslany.net/2017/11/most-common-deployment-slot-swap-failures-and-how-to-fix-them/) and make the changes to those rewrite URLs.
Feel free to reach back to me if you have any further questions.