Ok I managed to compile it using the latest tools and Windows 10 SDK.
So here's what I did, when you use Windows 10 with VIsual Studio 2019 on a fresh system:
1) Install the XAudio2 files using NuGet out of VS2019 (Tools->NuGet Package Manager)
2) Install the DirectX SDK (June 2010) for some libs and set the path accordingly.
3) Open xaudio2redist.h and look for this line:
// The Windows 7 version of audiosessiontypes.h does not define AUDIO_STREAM_CATEGORY, so if we are targeting
// Windows 7 we might have to define it here, depending on which SDK is used.
#if _WIN32_WINNT < _WIN32_WINNT_WIN8
Comment that #if preprocessor directive out so that AUDIO_STREAM_CATEGORY is correctly defined. I still don't know why this #if statement isn't entered as the _WIN32_WINNT target is set to Windows 7...
4) Set the (maybe) missing C++ directories to the Windows 10 SDK path.
5) set the tools to v142 and the SDK from 7.0 to 10.0 and compile