UE 5.4.4 refuses to compile a C++ project using the latest version of MSVC

UE 5.4.4 refuses to compile a C++ project using the latest version of MSVC.
UE 5.6, as well as UE 4.27.2, compile just fine with the latest version of MSVC (I’m using VS 2022). However, for some reason, UE 5.4.4 refuses to compile. I’m getting the following error:

[2/6] Compile [x64] SharedPCH.UnrealEd.Project.ValApi.Cpp20.cpp
C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(31): error C4668: '__has_feature' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(31): error C4067: unexpected tokens following preprocessor directive - expected a newline
C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Engine\Classes\Engine\SkeletalMesh.h(930): warning C4996: 'FBoneMirrorInfo': FBoneMirrorInfo is deprecated. Please use UMirrorDataTable for mirroring support. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.

Of course, I could additionally install MSVC 14.38, but I don’t want to clutter my system with multiple versions of the compiler. Is there a way to force UE 5.4.4 to compile with the latest version of MSVC? It’s strange that the old UE 4.27.2 works with the latest compiler, but UE 5.4.4 doesn’t.