According to this GitHub issue, right-clicking or long-pressing on the VSCode application icon in your dock on macOS brings up a context menu that does not match the recently opened items.
To resolve this, go to File > Open Recent > Clear Recently Opened
to remove all items from the dock. You can remove individual items with File > Open Recent > More...
, which will open the VSCode Command Palette, and allow you to click 'x' to remove individual files.