Client's uses the server's player controller (UE5)

I am trying to create a multiplayer game where one of the players is the host and I’m having a problem setting the player controllers.

When joining the server, a new player controller is created for the client, but the client thinks that the server’s controller is the local controller.

I printed the reference to 'self ’ on the player controller ,after making sure it is the local controller, and it returns the server’s controller on both the client and the server.

I was stuck on this issue for a while now so any help would be appreciated

Clients do not get a reference to any other controller. Only the server (host) has copies of all controllers.

Is Server is a better flag to check against.