clean build/clean archive fails

trying to build or archive using clean command results in:

Could not delete some/build/path/here because it was not created by the build system and it is not a subfolder of derived data.

running the same without clean, works just fine. also,

running on macOS big sur, 11.6 Xcode Version 13.0 (13A233)

forgot to mention that running the same on any older xcode will finish successfully

clean build/clean archive fails
 
 
Q