Please check if you turn on Role-based chat permissions in Microsoft Teams admin center > Teams: Teams settings > Safety and communication as below:
I test it in my tenant and it works after several hours. When the restricted user initiates a new chat, it will pop up the warning message as below:
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.