Can you undo "dont destroy on load"?

I have objects that need to be kept between multiple scenes, so I use Dont Destroy On Load. However, I need to have the option to cancel this and allow these objects to be destroyed on load at a later point. Is there a way to cancel or undo the Dont Destroy On Load function?

Not sure if it will work, but you can try this:

Put the DontDestroyOnLoad under an if statement.

something like:

if('condition here') {
    DontDestroyOnLoad(gameObject);
}

Then, just make sure the if is true while you don’t want to destroy the object and false when you do.