I do not see such formatting for the ar_SA locale in the Zend Framework version used by Magento 2:
Maybe the maarid.me website uses custom modifications for price formatting?
My module is compatible with Magento 2.2.3, but if you need the 1,000,000.00 formatting (with the decimal zeros) then you do not need my module for it: as you can see in the Zend Framework code above, it is the standard currency formatting for the ar_SA locale.
You just need to remove your currency formatting modification and restore the standard formatting.
I can do it for $150. You can order my service on Upwork: upwork.com/fl/mage2pro.
By the way, I do not understand why do you need the decimal digits (zeros) for such big numbers.
I have a lot of clients of my “Currenct Format” module from Saudi Arabia, and they all remove the decimal zeros. e.g.:
If you do not need the decimals, then a 100% working solution would be:
Remove your current custom price format modification
Install the “Currenct Format” module.
Setup the “Currenct Format” module in the proper way (hide the decimals, set the needed thousands separator, etc.)
So the total solution price will be $199 + $150.
Also the “Currenct Format” module would overcome your current custom price format modification, so maybe you do not need the step 1, but I do not know it. You can just install the “Currenct Format” module yourself and check it.
I have installed the exension.
Now the prices are formatted correctly on all pages except product ones:
So you also need the Step 1 from my message above (“Remove your current custom price format modification”).