How to remove instantiated prefab clones from a list with the same name?

Script is here, the focus point is on lines with the “//”
The context is that not all of the enemies are removed from the list since they all have the same name, so because of this, we cannot move on to the next wave. I need a solution.
Thanks!

    [Header("Wave Stuff")]
    [SerializeField] private TextMeshProUGUI waveCountdown;
    [SerializeField] private GameObject enemy;
    [SerializeField] private GameObject[] spawnPoints;
    [SerializeField] private float enemySpawnInterval = 10f;
    private bool enemySpawned;
    private int currentWave = 1;
    [SerializeField] private float enemiesToSpawn = 1;
    private int currentEnemies = 0;
    private GameObject enemyClone;
    [SerializeField] private List<GameObject> runtimeCreatedObjects;

    private void WaveSystem()
    {
        if(enemySpawned == false)
        {
            enemySpawnInterval -= Time.deltaTime;
        }
       
        waveCountdown.text = "Wave Begins In: " + Mathf.Round(enemySpawnInterval);

        if(enemySpawnInterval <= 0 && enemySpawned == false && currentEnemies != Mathf.Round(enemiesToSpawn))
        {

//            enemyClone = Instantiate(enemy, spawnPoints[Random.Range(0, //spawnPoints.Length)].transform.position, spawnPoints[0].transform.rotation);
//            runtimeCreatedObjects.Add(enemyClone);
//            currentEnemies++;

            if(currentEnemies == Mathf.Round(enemiesToSpawn))
            {
                enemySpawned = true;
                currentWave++;
                currentEnemies = 0;
            }
        }

//        if(enemyClone == null )
//        {
//            runtimeCreatedObjects.Remove(enemyClone);
//            if(runtimeCreatedObjects.Count == 0 && enemySpawned == true && currentWave <= 3)
//            {
//                enemySpawned = false;
//                enemySpawnInterval = 15f;
//                enemiesToSpawn += 2;
//            }
           
        }else if(enemyClone == null )
        {
            runtimeCreatedObjects.Remove(enemyClone);
            if(runtimeCreatedObjects.Count == 0 && enemySpawned == true && currentWave <= 5)
            {
                enemySpawned = false;
                enemySpawnInterval = 15f;
                enemiesToSpawn += 2;
            }
        }
        else if(enemyClone == null )
        {
            runtimeCreatedObjects.Remove(enemyClone);
            if(runtimeCreatedObjects.Count == 0 && enemySpawned == true && currentWave > 5)
            {
                enemySpawned = false;
                enemySpawnInterval = 15f;
                enemiesToSpawn += 2;
            }
        }
    }

I don’t see anything to do with names here.

Though this code seems pretty bugged in general. If you have three checks for enemyClone == null in a row. The first one will only ever be the one to execute as they are checking the exact same thing.

If you have enemies you want to listen to see if they’re all dead, I would keep a count of how many you spawn, and give each enemy a delegate that they fire when they die. When you spawn them, subscribe to the delegate with a method that decrements the spawned count, and starts the next round when the count hits zero.