How can I change Windows SDK?

Hi there, I built UE4 4.27 from sources and I’m trying to start development, but I noticed, that when I’m building project it says that Windows 10.0.18362.0 SDK is actually using. Yeah, I have several SDKs on my PC, but the latest one is 10.0.22000.0. I’m using VS 2022 for development (but UE4 I built with VS 2017) and I tried to “Retarget project” to 10.0.22 SDK version, but it keep using 10.0.18…
What am I doing wrong? Probably, problem is in the fact that Engine was built with VS 2017 toolchain? In this case, why it’s not possible to build UE4 with VS 2022 properly? I tried, but afterward I faced with issues of my project building…

Ok, probably I misunderstood something. I removed VS 2017 and all SDK except 10.0.22, than tried one more time to rebuild UE4 from sources in VS 2022.
I’ve got next errors in output:

3>  [1704/4730] Module.HoloLensTargetPlatform.cpp
3>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(211): error C4668: '_NOEXCEPT_TYPES_SUPPORTED' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
3>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(211): error C4668: '__cpp_noexcept_function_type' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
3>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(371): error C4668: '_NOEXCEPT_TYPES_SUPPORTED' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
3>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(371): error C4668: '__cpp_noexcept_function_type' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
3>  [1705/4730] Module.LiveLinkOverNDisplay.gen.cpp

After that I tried to start new project with previously built UE4 (VS 2017), but in the output I faced the same message:

1>Using Visual Studio 2022 14.31.31104 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10)

But I have no Windows 10.0.18362.0 SDK on my PC anymore… So, probably, output message is not about SDK used for building current project, but about SDK used for UE4 building?
So, how is it possible to use another SDK for project building, but have no possibility to build engine with the same SDK by itself?