It definitely doesn’t want to type ‘kill yourself’ and will suggest anything but the intended words until you manually type them out, and I’ve noticed it doing the same with other violent words/phrases, as well the well-known ‘fuck’ -> ‘duck’ stuff.
That said, it does adapt over time with usage and my iPhone will now happily curse like a sailor without putting up a fuss.
No issues typing Android here either, so that one doesn’t seem universal.