Hi,
AFAIK, the policy linked to the Listerner will take precedence over the App Gateway policy settings, and also as per Microsoft you will need to migrate or use WAF policies going forward "WAF policies are the new resource type for managing your Application Gateway WAF. "
Essentially, all the WAF configurations that were previously done inside the Application Gateway are now done through the WAF Policy.
Hope this helps.
JS
==
Please Accept the answer if the information helped you. This will help us and others in the community as well.