Facing issues while trying to set up UE4.27 from source code

I figured it out.
You need to replace this file in your engine directory:
UnrealEngine\Engine\Build\Commit.gitdeps.xml

With the latest one.
It exists as an asset file in the 4.27.2 release page:

https://github.com/EpicGames/UnrealEngine/releases/tag/4.27.2-release