Came here to say that you can also get it running with Bottles.
Install Bottles and create a new container/bottle for applications, install these dependencies in order dotnet40, dotnet45, dotnet452, dotnet46, dotnet461, dotnet462, dotnet472, dotnet48, dotnetcoredesktop3 and dotnetcoredesktop6.
Finally download .NET Desktop Runtime 7 manually and install it using the "Run executable" in your bottle.
Mixing other dependencies besides these ones would mess it up sometimes and was a bit finicky. That's why I suggest a new container and installing these in order for bottles.
Even though .NET 7 apps work in this case, it's not "officially" supported. So far I haven't experienced any crashes, but the issue is that the .Net 7 apps are slow. Regarding PKHEX, when you select a Pokemon, you have to wait a bit and you'll see the fields changing over time, just wait for it to finish.
If you want it snappier, you can always use the 22.12.18 version instead, it works with Scarlet and Violet. Though in the future you'll probably have to use the newest version (which uses .NET 7).
EDIT: If you only want/need PKHex, you can skip most of the steps above and just install .Net Desktop Runtime 7.
But if you need a container for all your .Net apps (with different versions), I suggest doing all the steps above.