To make it work for both, SSMS21 and VS2022, I set the VS2022 Install Targets like shown below in the screenshot
After having built the vsix I can run the vsix and choose where to install the SQLinForm (https://www.sqlinform.com)SQL Formatter in VS2022 or SSMS21.