The same shutdown occurs when the Mac seems to use the discrete graphics, and it tends to getting hot.
I had yesterday to disable all third party graphics intensive apps, and check the integrated graphics was used (Uninstall
Chromium etc..)
So I suggest to ensure your integrated graphics is not used so does Nividia, and also have a try to disable FileVault.