Grid rendering error

Description

Steps to reproduce

KiCad Version

Application: KiCad PCB Editor x64 on x64

Version: 7.0.5, release build

Libraries:
	wxWidgets 3.2.2
	FreeType 2.12.1
	HarfBuzz 6.0.0
	FontConfig 2.14.1

Platform: Windows 10 (build 19045), 64-bit edition, 64 bit, Little endian, wxMSW

	wxWidgets: 3.2.2 (wchar_t,wx containers)
	Boost: 1.81.0
	OCC: 7.6.3
	Curl: 7.88.1-DEV
	ngspice: 40
	Compiler: Visual C++ 1936 without C++ ABI

Build settings:
	KICAD_SPICE=ON

In KiCad schematic editor, as well as in the PCB editor the grid blows up when changing board colors in 3D viewer. The moment I submit an update to the board colors in the 3D viewer, the grid becomes completely messed up, the lines' width as well as the spacing completely blows up, changes when scrolling, which makes it very annoying to use. The problem disappears after a clean reinstall.

PCB editor: image image

Schematic editor: image image