Not exactly a fix, but I ended up uninstalling the Microsoft C/C++ extension and installing the clangd extension. Now, not only is the formatting instant, but also the code completion suggestions and the go-to-definitions are way better and faster.