For me it was due to VsCode's restricted mode
There was this small banner I did not notice at first.
When I was using the usual Ctrl+K Ctrl+F, it was saying:
They key combination (Ctrl+K Ctrl+F) is not a command
After losing some precious time on this issue, I finally activated the trusted mode and it worked as expected!
The main problem in my opinion is it should say the formatting is blocked by the restricted mode instead of having you guess it.