I find a fix! Debian published an update of nvidia drivers but only in bookworm-updates for now, so just add these lines in your /etc/apt/source.list file:
deb http://deb.debian.org/debian/ bookworm-updates main non-free contrib non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main non-free contrib non-free-firmware
This will upgrade your nvidia driver from 525.147.05-4 to 525.147.05-7 and it will compile against the new kernel!