It looks to me like the cleanExt option in sconsUtils is only ever None (I don't see it overridden anywhere), which means we only get the default file list in scripts.py:114. Given this, we could probably put a little logic about "core" in builders.CleanTree() (which is the only thing that takes cleanExt) to make the recurse option a bit smarter.
I may have been the cause of this with
DM-14124. Which suggests a possibly simple solution: two separate runs of CleanTree(), the first with the "standard" list of things to remove and without - prune, the second with any known directories (e.g. .cache) and with -prune.