Thanks for the advice but sadly 30gb page file didn't work so I reverted back to Automatic page file (default setting).
But finally I was able to figure out what was causing this issue. It was 100% Disk usage, whenever I had such freezes my disk usage was at 100%, CUP hardly went above 60-70% RAM usage was also under 80% (2x 8GB). So 100% disk usage was the culprit. I stopped and disabled Windows update service, Windows search services and Connected User Experiences and Telemetry service, and voila it worked, after this my disk usage never went above 20% most of the time it remained 0% sometimes there were spikes till 20% usage but that didn't cause game to freeze.
If someone is facing this issue do the following:
1. Press Win + R key
2. Type in "services.msc" without quotes
3. Search for Windows Update
4. Right click => properties => Click Stop button => make Startup type as Disabled
5. Repeat step 4 for Windows search and Connected User Experiences and Telemetry service.
You can re-enable Windows Update to update your windows (disabling this service will stop windows from updating)