Multiplayer lobby creation with our own server

I am creating a lobby system using backend server with the language node.js and in the unity i want that the user2 can join the same scene as the user1 have created. The user1 can create a lobby and the lobby code is being received by the user2 but after putting the lobby code the user2 cannot enter the same scene but it can join the lobby.

The piece of code responsible for joining the same lobby is this

else if (data.type == "lobby_scene")
{
   string sceneName = data.sceneName;
   Debug.Log("Received Lobby Scene Name: " + sceneName);

   // Store the received scene name in PlayerPrefs
   PlayerPrefs.SetString("LobbySceneName", sceneName);
   PlayerPrefs.Save(); // Make sure to save PlayerPrefs after setting the value

   // Load the lobby scene
   SceneManager.LoadScene(sceneName);

   // Add a check to verify if the lobby scene name is saved in PlayerPrefs
   if (PlayerPrefs.HasKey("LobbySceneName"))
   {
       Debug.Log("Lobby scene name saved in PlayerPrefs: " + PlayerPrefs.GetString("LobbySceneName"));
   }
   else
   {
       Debug.LogWarning("Lobby scene name not found in PlayerPrefs.");
   }
} 

the unity editor receives the scene name and the message gets printed in the console but after the debug, the code don’t work and i receive the error lobby scene name not found from the join lobby function.
Please if someone can help me out