@Muhammad Sameer Hussain Thanks for your update.
Sometimes, this error also occurs when the policy works well on devices, but something wrong about response the status from the devices. So, it is suggested to check if the configuration policy works on the devices. If not, please check if there is more error message about this policy in Event viewer >Applications and Services Logs > Microsoft > Windows > DeviceManagement-Enterprise-Diagnostic-Provider > Admin.
Hope it will give you some ideas.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.