Latte dock causing weird glitching issues

Whenever I log in or boot, most of my screen is glitched and only the middle part of it seems to be functional. when I did killall latte-dock && latte-dock, the problem gets fixed. How do I fix this?