I think I have found the bug. Every time I stop the VM that uses VF the whole iGPU is removed from the system
dmesg:
Oct 5 22:20:08 Unraid kernel: i915 0000:00:02.0: VF1 FLR
Oct 5 22:20:11 Unraid kernel: vfio-pci 0000:00:02.1: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none
Oct 5 22:20:11 Unraid kernel: i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
Oct 5 22:20:11 Unraid kernel: vfio-pci 0000:00:02.2: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none
Oct 5 22:20:11 Unraid kernel: vfio-pci 0000:00:02.3: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none
Oct 5 22:20:11 Unraid kernel: pci 0000:00:02.1: Removing from iommu group 24
Oct 5 22:20:11 Unraid kernel: vfio-pci 0000:00:02.2: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none
Oct 5 22:20:11 Unraid kernel: i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
Oct 5 22:20:11 Unraid kernel: vfio-pci 0000:00:02.3: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none
Oct 5 22:20:11 Unraid kernel: pci 0000:00:02.2: Removing from iommu group 25
Oct 5 22:20:11 Unraid kernel: vfio-pci 0000:00:02.3: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none
Oct 5 22:20:11 Unraid kernel: i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=io+mem:owns=io+mem
Oct 5 22:20:11 Unraid kernel: pci 0000:00:02.3: Removing from iommu group 26
Oct 5 22:20:12 Unraid kernel: i915 0000:00:02.0: Disabled 3 VFs
Oct 5 22:20:12 Unraid acpid: input device has been disconnected, fd 10
Oct 5 22:20:13 Unraid kernel: pci 0000:00:02.0: Removing from iommu group 0
Then the lspci doesn't show the iGPU at all.
The way to bring it back (other than reboot) is to force the pci rescan
echo 1 > /sys/bus/pci/rescan
It brings back main iGPU but not VFs. I need to go back to settings and re-enable VFs then it starts to work again and only then I can run VM again. I'm using it on N100 if it matters.