While accessing an Arabic URL such as /ar/product-categories/الأرز/ shows a 404 error on IIS it is because IIS doesn't accept multi-language URLs.
Please paste the below code and try to fix this error.
if ( isset($_SERVER['UNENCODED_URL']) ) {
$_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];}