Avoid running all projects after controller migration

We are about to migrate the jenkins controller to a new system. (Jenkins 2.346.3)
There are no projects tied to the controller. All jobs run on the agent machines.

When i want to connect an agent to the new controller, all projects of this agent start to build. (They appear to kind of “have not run yet” to the new controller).

Is there a way to avoid running all projects if connecting the agents?

I use a small groovy script in my init.groovy.d directory to detect the existence of an environment variable and if that variable exists and is set to true, then the system is put into “Prepare for shutdown” state.

The script looks like this:

// Enter "Preparing to shutdown" state
if (System.getenv("START_QUIET")?.equalsIgnoreCase('true')) {

You can see it in context if that helps.

When starting a configuration where I want no jobs to run, I set START_QUIET=true in the environment and then run the Jenkins controller.

So, your solutions would postpone the building of the jobs.

I am looking for a way to not build them at all due to the controller switch.
I do want them to build because of usual build triggers.