Does going to Preferences > Technology Previews > and checkmark "Deactivate Native Canvas" help?
Restart Ps to be sure it takes.
What version of Photoshop are you running? That looks like CC 2019 or 2020.
If this just happened recently, and you don't recall making any changes to your OS or Photoshop, perhaps the preferences need to be reset
Version 21.2. I just tried Preferences / Performance / GPU Advanced and set the drawing mode to BASIC instead of NORMAL and that seems to have eliminated the squares. Thanks for your comments.
That gets marked as a solution should anyone else come across this problem. Thanks for chasing it down.