Still have problem with crashing and freezing

I hate to be the harbinger of bad news, but if a computer fully shuts down while playing that cannot be caused by the game on its own - issues of that scale are almost always based on serious conflicts in either hardware or operating system.

Since you mentioned this happening on a MacBook you will want to reach out to Apple support, and have the cooling and power supply components of the laptop checked out - they’d be the usual suspects in such cases, and need expert handling.