How to continue the work in onTriggerStay, when it disables, for remaining objects?

Hello everyone, my problem here is,

i want objects that collides with my spherical collider to do some work, while they are inside of it.

However, i’ll completely disable the collider. Then, While some objects are doing the work, may stop working when it is disables.
I want objects that once collides with collider, to finish the work until the end, even if the collider is being disabled.

I don’t want to start too much coroutines for much objects at the same time.

void OnTriggerStay(Collider other)
    {
        if (other.CompareTag("Tag"))
        {
                //Work..
        }
    }

First solution, has came to mind causes infinite while loop of course:

void OnTriggerEnter(Collider other)
{
      if(other.CompareTag("Tag")
      {
             while(true)
             {
                   //Work..
             }
      }
}

Is there any solution idea, can solve the problem? Thank you in advance…

Why would you make a while loop. If you want some work to be done over several frames you can use coroutines. You can also create and attach a specific component (MonoBehaviour script) to make a work on your objects within coroutines or inside an update loop, then destroy it when needed (upon reaching some condition).

Ontrigger events can be used like coroutines

 IEnumerator OnTriggerEnter(Collider other)
 {
       if(other.CompareTag("Tag")
       {
              while(true)
              {
                    yield return null;
              }
       }
 }