Only the java.exe file is removed, the other files in the JDK /bin folder remain.
I have Kaspersky Endpoint Security 10 installed.
I tried to disable Kaspersky, and ran the process again. Now, on launching the server, I see a message related to ‘call_and_exit.bat’:

In this case, with Kaspersky disabled, the java.exe file was NOT deleted.
I tried to run gradlew manually.
‘gradlew setupTomcat’ worked fine.
‘gradlew deploy’ produced a long output, the suspicious lines were:
:app-core:compileJava NO-SOURCE
:app-gui:compileJava NO-SOURCE
The message received from the daemon indicates that the daemon has disappeared.
FAILURE: Build failed with an exception.
* What went wrong:
Could not dispatch a message to the daemon.
I then ran it with --info, this produced a very long listing, the suspicious lines were:
file or directory 'D:\Development\Cuba.Platform\Projects\sample-sales\modules\core\src\main\java', not found
Skipping task ':app-core:compileJava' as it has no source files and no previous output files.
file or directory 'D:\Development\Cuba.Platform\Projects\sample-sales\modules\core\src\main\resources', not found
And these folders actually do not exist.
Thinking something might have gone wrong in the initial setup of the ‘sample-sales’ app, I deleted it, and re-installed it (with Kaspersky disabled).
And now it seems to run OK, even after multiple stops and restarts of the server (always with Kaspersky disabled).
So everything points to Kaspersky detecting, blocking and deleting java.exe.
This is an up to date Kaspersky install, using latest virus definitions. I cannot imagine why something as generic as Java is being detected wrongly ?