Microsoft Documentation, Custom rules for Web Application Firewall v2 on Azure Application Gateway. This document explains the processing logic for custom WAF rules. It states, "If you have a rule to allow traffic, the request is sent to the back-end, and no other custom rules or managed rules are evaluated." It also confirms that listener-specific policies are evaluated before global policies.
Microsoft Documentation, Web Application Firewall modes. This source clarifies the behavior of Prevention and Detection modes. "In Prevention mode, WAF blocks incoming requests that match the rules... In Detection mode, WAF doesn't block any requests. Instead, it monitors and logs requests that match any of its rules." This supports the analysis for Policy2 on www.contoso.com.