VS2017 and VS2019 are both 32-bit applications. VS2022 is a 64-bit application. Since build events in VS2017 and VS2019 are in WOW64 processes Sysnative is recognized as referring to the System32 folder (not SysWOW64) on a 64-bit system. The docs at file-system-redirector explain "WOW64 recognizes Sysnative as a special alias used to indicate that the file system should not redirect the access. This mechanism is flexible and easy to use, therefore, it is the recommended mechanism to bypass file system redirection. Note that 64-bit applications cannot use the Sysnative alias as it is a virtual directory not a real one.".
If you want to use the 64-bit System32 folder then in VS2022 use System32 instead of Sysnative.