Why this happened:
Apple updated typingAttributes since iOS 11
This dictionary contains the attribute keys (and corresponding values) to apply to newly typed text. When the text view’s selection changes, the contents of the dictionary are cleared automatically.
How to fix it:
@Serdnad's code works but it will skip the first character. Here is my finding after trying everything that I can possibly think of
1. If you just want one universal typing attribute for your text view
Simply set the typing attribute once in this delegate method and you are all set with this single universal font
func textViewShouldBeginEditing(_ textView: UITextView) -> Bool {
//Set your typing attributes here
textView.typingAttributes = [NSAttributedStringKey.foregroundColor.rawValue: UIColor.blue, NSAttributedStringKey.font.rawValue: UIFont.systemFont(ofSize: 17)]
return true
}

2. In my case, a Rich Text Editor with attributes changeinge all the times:
In this case, I do have to set typing attributes each and every time after entering anything. Thank you iOS 11 for this update!
However, instead of setting that in textViewDidChange method, doing it in shouldChangeTextIn method works better since it gets called before entering characters into the text view.
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
textView.typingAttributes = [NSAttributedStringKey.foregroundColor.rawValue: UIColor.blue, NSAttributedStringKey.font.rawValue: UIFont.systemFont(ofSize: 17)]
return true
}
