I don't know how to get around it with what you are doing, but for anyone else that has this problem in just writing messages in Teams, I wrote what I wanted to say in Notepad++, then copied and pasted it into the chat. It worked great.
www.000webhost.com