GDExtension page for checking out godot-cpp points to version 4,0 instead of 4.1 which later on causes building the extension itself to fail. Godot-cpp builds just fine with incorrect instructions.:
git submodule add -b 4.0 https://github.com/godotengine/godot-cpp