This indeed seems to be a bug in Teams. However, this is a problematic bug because there doesn’t seem to be a consistent way to reproduce the problem. And without a consistent reproduction any fix will be experimental. Logging is also very limited around this area for privacy reasons.
It would be very helpful if anyone could remember and describe how they got into this state where left and right keys stopped responding.
There are ideas in this thread about GPU acceleration, print screen key, function key, accessibility keys, switching between editing and composing messages etc, but none can consistently reproduce the problem. The search continues.