If it's 2 Principled BSDF shaders, you can simply mix the inputs instead of the 2 shaders and have only one shader instead of 2.