Install the extension "Clang Power Tools 2022"
In the solution explorer dock widget, right-click on your solution, then click "Clang Power Tools" > "Settings" menu entries
In the "Format" tab :
"Assume filename" = .clang-format (I do have a .clang-format file in the top-level directory of my project)
"Style" = file
"Format on save" = on
Profit