For me modifying the swap file didn’t work at all. My game crashed randomly every few minutes whatever I did.
The newest NVDIA driver seems to help a lot and, if the game crashes (much more seldom these days), I delete the LocalPrefs file from \Documents\Diablo4.
This way, for the first time since the DLC launch, I can play few hours sessions without crashing.