The memory allocation is done in the process.
I don't remember if the original GetComponent does memory allocation or not, but seeing the new keyword is something that console developers need to be aware of.
Also, the static field in GameObjectExtension doesn't look like it's being freed.
Shouldn't the references in the scene be freed when the scene is switched?
I haven't tried it, but when you transition from sceneA -> sceneB -> sceneA, does this dictionary continue to store elements forever?
I wanted to know why you implemented this because I don't see the need to go to the trouble of using a complicated feature, especially if it doesn't affect performance...