git clean -fdx should be git clean -ffdx as per this advice
If a build creates a git repository in a subdirectory of the workspace, the option to "clean after checkout" will skip it. This is expected behavior of git that you can verify quite easily:
Git plugin cleans the workspace by removing the foo directory that has been initialized with its own git repository
Git plugin silently fails to clean the workspace because the git command it runs succeeds with a warning message that the directory containing another repository was skipped:
Use the -f option twice with git: git -ffdx to force removal of directories that contain git repositories.
I'm not sure whether simply making this change will affect subdirectories; it shouldn't, but I haven't tested.