After a long session of work (5 hours), I finally found the problem. In Unreal Engine templates, the level usually comes with partition enabled by default, so I guess the level gets an ID. This seems to be important for NavMesh, because when you create a new empty level it just has a default ID, and for some reason NavMesh can’t be built. Once I enabled World Partition for the level, my NavMesh finally worked! Hopefully, this will help people in the future. For world partition please watch youtube tutorials. Tools>Convert Level>Select your Level
without world partition
with world partition