We do not provide settings that would allow you to disable the ability of another account to share or comment on Scratch. However, there are a couple of options you may consider to limit the interactions your students have with other Scratchers.

One option would be to turn off commenting on each individual student's profile page and project pages - this will limit other Scratchers from communicating with your students outside of “loving” and “favoriting” their projects. Though, it will not stop your students from sharing projects or commenting on Scratch.

Alternatively, you may consider the Scratch app (available for Windows, MacOS, ChromeOS and Android). It would allow you and your students to continue making projects offline without the added components of the Scratch online community: https://scratch.mit.edu/download