How do I remove 'open with code' from my context menu for Visual Studio Code?

I used ShellMenuView to find the offending records (there were several) and optionally disable them. You can then right click and select properties on the "Open with code" rows to find the registry paths. With that info I could delete the relevant keys from the registry manually. One was HKEY_CLASSES_ROOT\directory\shell\Ticino\Command but there were others.

This link will help you to modify registry.

Most of the menu items that used for all files and folders can be found at one of these keys: