Wayland, Nvidia driver errors while trying to resize window while Factorio is running

Trying to resize some windows including but not limited to Obsidian.md/Firefox in Wayland whilst Factorio is running causes the following error:
[drm:nv_drm_gem_alloc_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to allocate NVKMS memory for GEM object and causes the resized application to either crash or to fail to resize.
Using KDE Plasma Version 5.27.8.
This happens on the latest drivers as well.
I am using older drivers 535.146.02 because there is black flickering playing Factorio using the latest driver (545).

nvidia-bug-report.log.gz (559.6 KB)

Please feel free to ask for additional information to triage the issue.

Managed to find the root cause of the issue,
The issue was caused by being out of VRAM (2932MiB / 3072MiB). Which I tested by lowering VRAM usage by tweaking in-game options. (This is less than ideal)
The error is a failed allocation for a larger swapchain/image which should be neglectfully small.

Would it be possible to limit advertised VRAM per process? Or globally.
So that, in the future, even when a process is out of advertised VRAM, there is still a small amount left for, (for example) swapchain images.

Tested if the same happens on Windows 10. It does not.
Please fix however it works in Windows 10. (I’m guessing by swapping vram to ram)