What is the blue box that shows up intermittently
I have a MacBook Pro 16 in 2021 with Sonoma 14.4.1 chip M1 PRO. Occasional a blue box, rectangular, shows up in various places on the screen and creates chaos. I first notice it when I start typing and I can not get a space. All the words run together. It did just now. I tried to capture it but when I activate the screen shot the blue box goes away and everything's normal again. It may happen in apps other than Safari, but I don't remember that it did. What is it and how can I get rid of it please.
Thanks
Carl
MacBook Pro 15″, macOS 12.6