No, bools are compiled as different permutations
If you want to change it at runtime, you can switch to a scalar parameter, and use a lerp node to effectively emulate a bool (at 0 it’s A, at 1 it’s B)
This will evaluate both inputs though, so you won’t avoid any cost from the input that is not active.
Static bool does remove the cost, since it technically removes it entirely, and only compiles and runs the selected input.
There are some long discussions about dynamic branching in Unreal, but as far as I know it doesn’t exist yet, and none of the proposed methods seem to provide any performance benefit