How could be the "Eurasian magpie" bird won the "Mirror Test" where Gorillas failed
I think this website provides a pretty surprisingly thorough breakdown of avian brain anatomy, including historical contexts and debate around what exactly is homologous and what is not, and whether 'homologous' is a useful bit of information.

In short: It was thought until recently that the bird brain was just the core of the mammal brain with some layers peeled off, but it turns out to be more like a scale model, with many of the same parts. Roughly. Sort of.

So birds do not technically have a neocortex. They have a structure that looks like a neocortex, but it also looks like some other things. Gorillas do have a prefrontal cortex etc (even if they are smaller than in humans). The knowledge that structure X performs function Y in an organism generally implies little about a second organism, with or without structure X. Even features like 'wings are for flying' and 'fins are for swimming' have exceptions.