Siemens introduced "Project downgrade" tools in late 2021. You could write code in V16 but compile for V15.1 hardware. This was complex but possible via the TIA_Portal_V16_Downgrade.exe tool.
To ensure a seamless installation without registry errors, follow these steps precisely: best 2021 download siemens tia portal v151