Whenever I open a new shading window, whatever I do in one is just mirrored on the other. If I click a node in one window, the same node and material get selected in the other. I can't edit two shaders at once. How can I edit two shaders simultaneously?
The windows sync with the selection you do. However if you want to retain a specific selection, just use the little pin icon, in the upper right handside of the shader editor to keep the tree "pinned". The second one will still update if not using the pin.
Release the pin to go back to the active selection