Your current solution—manually enabling EOS_CAN_SHUTDOWN on macOS standalone—is also valid and is a common practice in production to ensure the process terminates correctly.
It’s worth noting that there is a warning in the code indicating that unloading shared libraries on macOS/Linux is “not reliable,” which is why this directive is not enabled by default. However, this warning mainly applies to hot-reload scenarios (e.g., inside the Editor), not to standalone builds.
In a standalone build, shutting down the app with this define is safe, provided that:
You do not attempt to unload and reload EOS during the same execution.
You only use it when the process is actually terminating, not during Editor domain reloads.
For these reasons, updating the EOS_CAN_SHUTDOWN definition to include UNITY_STANDALONE_OSX is the cleanest and most maintainable approach. It ensures consistent behavior between the Editor and macOS standalone builds without requiring manual patches.
On macOS and Linux, there isn’t a known reliable way to unload shared libraries.