The camera is attached to the head socket. This can be reduced from Anim graph of character, you have to add transform modify bone just before output pose.
I am facing same problem while making my game. You can watch this video for full tutorial: “https://youtu.be/BNxeXHrBNz0?si=CtJxPGUg_j2c1fho”