We also had this problem. It’s because cloud builds (wrongly, imo, see: Windows Desktop 64-bit being built on a Mac editor ) have UNITY_EDITOR_OSX and UNITY_EDITOR defined.
What you can do is change all instances of:
#if (UNITY_STANDALONE_OSX && !UNITY_EDITOR) || UNITY_EDITOR_OSX
to
#if (UNITY_STANDALONE_OSX && !UNITY_EDITOR) || (UNITY_EDITOR_OSX && !UNITY_STANDALONE_WIN)
And all instances of
#if (UNITY_STANDALONE_WIN && !UNITY_EDITOR) || UNITY_EDITOR_WIN
to
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN || UNITY_WSA
Note that this is all in mostly generated wwise code, so if you update you may have to do it again.