PAC url configuration through JAMF breaks Captive Portal Login

We are using JAMF profile to configure automatic proxy configuration URL on macOS. The configuration looks as following:

#scutil --proxy
<dictionary> {
 BypassAllowed : 0
 ExceptionsList : <array> {
  0 : https://exception.com
 }
 FTPPassive : 0
 FallBackAllowed : 0
 HTTPEnable : 0
 HTTPSEnable : 0
 ProxyAutoConfigEnable : 1
 ProxyAutoConfigURLString : https://pac.com/FailbackWithExclusionsENDUSERS.pac
 SOCKSEnable : 0
} 

This configuration works fine with normal network. When user tries to connect to a Captive Portal Network, the captive portal login page does not appear but an error page appears as shown below

We need help to identify what is wrong with this configuration causing this error.

PAC url configuration through JAMF breaks Captive Portal Login
 
 
Q