fix visual glitching when toggling the sidebar on/off with the sidebar toggle hotkey