I have had this same problem, and could never get it to work. However, I found a bug report on this on GitHub: https://github.com/llvm/llvm-project/issues/56283.
It looks like this was never fixed, but there is more info here: https://reviews.llvm.org/D129443
(Took answer from another ans: https://stackoverflow.com/a/74109314/16529532) If it's applicable, I would avoid clang format and use your code editors formatter tool. If you can't that's okay.