The problem was that you’re using a socket location and rotation of your mesh in the GetActorEyesViewPoint, which is driven by animation. But by default the animation does not seem to update those socket transformations, unless the mesh is in view (or unless you set it to “Always Tick Pose and Refresh Bones”, then it will udpate always, regardless whether its in view or not).
Which means that with the default behavior, your code would only work if the mesh is in view of the server. And if you run as client, then you have a server in the background which doesn’t render anything, so it won’t work there (unless you set it to always refresh the bones).
That setting is for optimization (e.g. if the animiations would be cosmetic only, then you would only need to update them when in view of the player).