I've been having issues, especially with small comps (eg tiny 128*128 pixel ones uses as a particle texture source). While working with them, sometimes the comp viewer window will go blank, and you can only see the content of that comp by changing the magnification (zoom level) of the comp window. I've recorded a screen capture showing the issuse in action: https://www.youtube.com/watch?v=SDFLoYdjXmc
This is on an iMac running Big Sur (11.4) and the latest stable build of After Effects (18.4.0). Anyone else getting this? The problems seem to be reduced if you turn off hardware-accelerated UI windows in preferences. The iMac has a 16GB 5700XT, so can't imagine its a GPU memory related issue
You could try clearing the media cache. However, it seems to be related to the GPU driver. Could you check and install if there are any updates available for your OS because that's the best way to update the GPU driver on macOS.