From weakest to strongest protection:
- Containers can refer to a variety of things, but most are based on Linux namespaces, with weaknesses similar to Flatpak.
- Hypervisor-based virtual machines will usually provide better isolation than containers, but not perfect or foolproof.
- Dedicated hardware, without any way to reach systems you wish to protect, is better still.
- Don't allow hostile code to run at all.
VFIO gaming falls somewhere between 1 and 2.
You'll have to decide for yourself how to balance risk, reward, and cost with your threat model.