OK people, I was going through the same thing but I FINALLLLLLLLLLLLLLY found how to fix this problem, so all the potty mouths out there - here is the solution (well at least it worked for me on my Pixel 2 XL with the July 2018 security patch). There are 3 steps that I followed:
Step one:
Go to settings.
Select “Language and Input”
Select “Personal Dictionary”
Select “+”
Select the Phrase field.
Add the specific profane word you want to use in that field.
Select “Next” on your keyboard.
Select “Done” on your keyboard.
Step two:
Settings/Languages & Input/Virtual Keyboard/Google Voice Typing/Block-UnBlock Offensive words
Step three:
Settings/Languages & Input/Virtual Keyboard/Text Correction/ un-check the radio button for Block Offensive words.
Hopefully this workaround works for all of you too. Let the swearing begin (or resume)
