Riot catches and punishes people for in-game behaviors more slowly than for chat behaviors. This is because they review those cases manually and are more careful not to falsely ban an innocent player.
Chat offenses are easy to catch by comparison. They can simply use a chat parser to look for patterns of language that are known to be toxic.
It's not that they do nothing. Rather, they simply handle the two types of misbehavior with systems that have different efficiencies. Trolls are still caught, it just takes longer.
here's my suggestion:
It may be tempting to cuss a troll out, but if you show them your anger then you are letting them win. They want that attention, they want to see evidence of your suffering at their hands. If you instead keep quiet, or better yet participate in chat but never address them or acknowledge them, then you will instead drive the troll to new heights of frustration. Try it, it's fun! And the best part is you're not doing anything wrong so you can't get in trouble for it.