Here is a curiosity. For the sake of convenience, I put a function in a blueprint function library that gets the player pawn, gets an attached actor component, and returns a member variable of that component.
But that function returns nothing when I use it, but if I put the same nodes into a blueprints event graph directly, it does work.
I guess it must have something to do with the world context? I am not sure what that means, but for example, I use similar functions for getting other actor references and it works fine.
I believe it has to do with the world context. You can connect it as a function input, and from your player, “get a reference to self” if called from your player BP or “get player character” if called from somewhere else. That should work.