It is graphics related. I do not know what returning 'false' from the vendor driver means, but apparently the macOS software was not happy about it.
panic(cpu 3 caller 0xffffff7f85f843a1): virtual bool IOAccelLegacyDisplayMachine::display_mode_did_change(uint32_t): vendor driver returns false
@/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/IOAcceleratorFamily_kexts/IOAcceleratorFamily-438.7.3/Kext2/IOAccelLegacyDisplayMachine.cpp:267
Kernel Extensions in backtrace:
com.apple.iokit.IOGraphicsFamily
dependency: com.apple.iokit.IOPCIFamily
com.apple.iokit.IOAcceleratorFamily2
dependency: com.apple.driver.AppleMobileFileIntegrity
dependency: com.apple.iokit.IOPCIFamily
dependency: com.apple.iokit.IOSurface
dependency: com.apple.iokit.IOGraphicsFamily
dependency: com.apple.iokit.IOReportFamily
com.apple.nvidia.driver.NVDAResman
dependency: com.apple.iokit.IOPCIFamily
dependency: com.apple.iokit.IONDRVSupport
dependency: com.apple.iokit.IOGraphicsFamily
dependency: com.apple.AppleGraphicsDeviceControl
You could try disabling the Discrete GPU and using the intel integrated GPU to see if this is the Discrete graphics chip
gSwitch can keep macOS from using the Discrete GPU
https://codyschrank.github.io/gSwitch
This is an experiment, unless it turns out your Discrete GPU is failing, then you either want to get it fixed (very expensive unless under Apple Care), or run all the time on the integrated intel GPU.