To restrict chat inside a meeting, follow these steps. Please note that this will not restrict person-to-person chat.
Click the three dots to the right of the channel in your class.
Select Manage channel.
Select Only owners can post messages.
Now edit your meeting and be sure your meeting is in the channel to which you made the change.