Presuming ExtendScript, here is DOM code for changing the blend mode without selecting the top layer, regardless of the layer name:
app.activeDocument.layers[0].blendMode = BlendMode.EXCLUSION;
Or by selecting the top layer, then changing it's blend mode, regardless of the layer name:
app.activeDocument.activeLayer = app.activeDocument.layers[0];
app.activeDocument.activeLayer.blendMode = BlendMode.EXCLUSION;
https://theiviaxx.github.io/photoshop-docs/Photoshop/BlendMode.html
Edit:
I you want to use the explicit layer name:
app.activeDocument.layers.getByName("Layer 2").blendMode = BlendMode.EXCLUSION;
or
app.activeDocument.activeLayer = app.activeDocument.layers.getByName("Layer 2");
app.activeDocument.activeLayer.blendMode = BlendMode.EXCLUSION;