I test in my SharePoint, Restricted View permission works well to prevent users downloading files.
Please follow below tips to troubleshoot the issue.
1.Select the folder -> Manage access -> Advanced settings -> Check permissions -> Check whether the security group has other permissions except Restricted View permission.
2.Clear the browser cache, open the document library in the Incognito window or in another browser to check whether the issue exists.
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.