Object not staying alive while despawning despite dont destroy with owner flag

hello im having a weird issue with despawning objects. i currently only would like to have a player object on the local player (i dont think i even need it on the server either but i believe it needs to exist on the server anyways) when i call Despawn(destroy: false); as well as setting the donwdestroywithowner bool as true i have varified the flag on the local player as correct however when a new client connects and calls the rpc to despawn it it happens on the local player as well(server objects persist)
heres the code block that handles creation

private void SignInSuccessful()
    {
        NetworkManager myNetworkManager = NetworkManager.Singleton;
        myNetworkManager.NetworkConfig.ConnectionApproval = true;
        if (userName == "test")
        {
            myNetworkManager.ConnectionApprovalCallback += ApproveConnection;
            myNetworkManager.OnClientConnectedCallback += newClientConnected;
            myNetworkManager.StartServer(); 
        }
        else
        {
            myNetworkManager.StartClient();          
            StartCoroutine(setPlayerData());
        }
        //Debug.Log(userName + " has signed in with Id " + AuthenticationService.Instance.PlayerId + " services profile = " + AuthenticationService.Instance.Profile + " local client id " + myNetworkManager.LocalClientId);
    }

heres the coroutein

private IEnumerator setPlayerData()
    {
        while (MyPlayerController.LocalInstance == null)
        {
            //Debug.Log("player object not found");
            yield return null;
        }
        int networkID = (int)MyPlayerController.LocalInstance.getNetworkClientIdFromLocalPlayer();
        string myPlayerID = AuthenticationService.Instance.PlayerId;
        myPlayerIdentificationData = new(networkID, userName, myPlayerID);
        Debug.Log("authman has set the player data as networkId:" + myPlayerIdentificationData.NetworkClientID + " userName:" + myPlayerIdentificationData.PlayerName + " playerId:" + myPlayerIdentificationData.PlayerID);     
        MyPlayerController.LocalInstance.updatePlayerDataStateOnServerRPC();
    }

when the player is spawned here is the player controller that handles the despawn

public override void OnNetworkSpawn()
    {
        NetworkObject myNetworkObject = this.NetworkObject;
        //Debug.Log("is local player:" + IsLocalPlayer + " is owner:" + IsOwner);
        if (IsLocalPlayer)
        {
            myNetworkObject.DontDestroyWithOwner = true;
            LocalInstance = this;
            StartCoroutine(WaitForPlayerData());
        }
        else
        {
            if(!IsServer)
            {
                DestroyIfObjectIsNotLocalPlayerOnServerRPC();
            }
        }
    }

and finally the rpc

[ServerRpc (RequireOwnership = false)] private void DestroyIfObjectIsNotLocalPlayerOnServerRPC()
    {
        this.NetworkObject.Despawn(destroy: false);
    }

been struggling with this all weekend can anyone provide some more insight into my issue? thanks for looking!

Rather than despawning the objects you can prevent them spawning in the first place. On the Player prefab’s Network Object component untick Spawn With Observers and, assuming the player objects are auto spawned, show the client their player on connection. Something like the below:

     NetworkManager networkManager;

        private void Start()
        {
            Application.targetFrameRate = 15;

            networkManager = NetworkManager.Singleton;

            if (!ParrelSync.ClonesManager.IsClone())
            {
                networkManager.OnClientConnectedCallback += OnClientConnected;
                networkManager.StartServer();
            }
            else
            {
                networkManager.StartClient();
            }
        }

        private void OnClientConnected(ulong clientId)
        {
            if (networkManager.ConnectedClients.TryGetValue(clientId, out NetworkClient networkClient))
            {
                networkClient.PlayerObject.NetworkShow(clientId);
            }
        }

        private void OnDestroy()
        {
            if (networkManager.IsHost)
            {
                networkManager.OnClientConnectedCallback -= OnClientConnected;
            }
        }
    }

i was actually attempting to do something similar with the approve connection callback but maby my understanding was flawed also realized i missed the block that actually spawns it

 private void newClientConnected(ulong clientId)
    {
        Debug.Log("newClientConnected " + clientId);       
        GameObject playerObject = Instantiate(NetworkManager.Singleton.NetworkConfig.PlayerPrefab);
        //Debug.Log("playerObject.name = " + playerObject.name);
        playerObject.GetComponent<NetworkObject>().SpawnAsPlayerObject(clientId); 
        StartCoroutine(WaitForPlayerDataInitializationOnPlayerObjectToCompleteBeforeSendingDataToServer(clientId));
    }

however i will play with observer’s and show although i thought this would act as set active when i read the api so i didnt attempt it ill post an update when i get home from work