In VSCode, I use https://github.com/jackiotyu/git-worktree-manager for the same purpose - the extension has before create/before destroy WT hooks which you can run anything from. Mine symlinks workspace file from main checkout, installs packages and copies over some files. Very handy.