This issue occurs due to software glitch or it can also be seen with issues like graphic card and other screen related display settings gets disturbed due to heavy usage as well or any macOS updates.