The problem was that vscode uses Gradle version 8.8.0, and I generated the wapper files from Gradle version 9.0.0.
Bottom line: The Gradle extension for vscode did not work due to version incompatibilities.