It’s a bug, it has been reported
Should be fixed on next @capacitor/cli release
As workaround you can run npx cap init and add capacitor inside the integrations object in ionic.config.json
npx cap init
"integrations": { "capacitor": {} },