How to Initialize the object references in C++?

the code compiles fine with editor closed , the problem is the cast is failed and the MyCharacterRef is always nullptr

this cause this issue too: Issue Caused by this Nullptr