Azure Application Gateway Extract Configuration Help

Have to extact/copy an Azure Application Gateway from one subscription to another which unfortunately is not a supported resource to Move between subscriptions. There are a lot of rule and configs so need to automate it as much as possible. I have looked up different information online and looks like this is the scenerio and solution: https://learn.microsoft.com/en-us/answers/questions/1372152/moving-application-gateway-along-with-waf-to-anoth

Has anyone had experience with modifying the exported template and performing such scenario? Any suggestions for scripts to use?

Any suggestions would be apprecieted! Thanks!