One way to approach this (probably the easiest) would be to make and use an enum variable for the available weapons and then check which is the current using weapon and run the coresponding SubTree behaviour.
So instead of replacing subtrees, you have them already in your graph and “switch” between them accordingly.
Do you want to replace subtrees for a specific reason, instead of having them placed already?