You could just save the
Entity Reference in a variable and then check in OnClientDisconnect if the Entity Reference of the player that disconnected matches the saved variable and assign the name to a new bot.
Keep in mind that OnClientDisconnect is called on each map change.
Also in your for loop you are missing the IsFakeClient check.