I encountered this issue as well, where the text-to-speech feature wasn't working in Arabic. To resolve the problem, follow these steps:
Go to your device's settings and select Arabic (Saudi Arabia) as the preferred language and drop it to be the first. Ensure the Arabic (Saudi Arabia) voice is installed, as it supports speech functionality. If necessary, update your Windows or restart your device. This should fix the issue.