This is a known issue https://github.com/microsoft/vscode-java-debug/issues/606, https://github.com/eclipse/eclipse.jdt.ls/issues/1137, which caused the new package not recognized during building workspace. It’s expected to be fixed in vscode-java Middle October release.
Current workaround is reload VS Code window, or F1 ->Clean the java language server workspace.