I had the exact same issue was able to solve it by adding tsConfigPath. This is mentioned in the usage of the plugin.
If you start with official Vite template, you should specify the tsconfigPath:
{
plugins: [dts({ tsconfigPath: './tsconfig.app.json' })]
}
Reference: https://github.com/qmhc/vite-plugin-dts