I created .war by using gradlew bootJar and manually deploy to Tomcat 9.0.16. However when I deleted war and Tomcat failed to delete the exploded folder. Logs are:
I just tried, and everything worked fine for me - web application has been successfully undeployed.
Try the latest tomcat version (it is 9.0.55). If it doesn’t help, then tell us your OS and java version.