They recently changed something in Teams (I first noticed at the beginning of June) - now if you don't move your mouse for 5 mins it automatically marks you 'idle' and...stops receiving messages. Then when you move the mouse all the messages people sent while you were idle arrive at once.
If you don't run it on your main machine this becomes pretty annoying pretty fast, and there doesn't seem to be an option anywhere to change 'mark me idle after' time