It's pretty much impossible to protect against bots scraping data on Mastodon, because users' posts are public by default.
What we can do is block servers that are known to be scraping data.... which is something we do to the best of our ability. Other than that, people can put their profiles to 'followers only', which provides a bit more security from mass data scrapers.