Defender Mask URL causes 502 error

Defender Mask URL is causing 502 pages on my All sites Pages on multisite, is there any fix for this?