Default background color of inlay hints in VSCode or Neovim is not transparent. This can be changed by adding the following:

For Neovim

neovim.nix
highlightOverride = {
  LspInlayHint.bg = "";
};

Note

If you are not using Nix, you can set the highlight group manually.

init.lua
vim.api.nvim_set_hl(0, "LspInlayHint", { bg = "" })

For VSCode

Tip

You can replace Monospace Light and Monospace Dark with your preferred theme.

settings.json
"workbench.colorCustomizations": {
    "[Monospace Light]": {
        "editorInlayHint.typeBackground": "#ffff0000",
        "editorInlayHint.background": "#ffff0000",
        "editorInlayHint.parameterBackground": "#ffff0000",
    },
    "[Monospace Dark]": {
        "editorInlayHint.typeBackground": "#ffff0000",
        "editorInlayHint.background": "#ffff0000",
        "editorInlayHint.parameterBackground": "#ffff0000",
    }
}