I’m affraid this is a hardware fault.. But you could try the simple basics first. Full system reset, check if there is dust inside there, try an air blower ect. Perhaps the slider is not seated correctly to the switch.
The slider have it’s own PCB and is connected with a ribbon cable to the PCB where the speakers are connected. It’s fixable, but it won’t be easy.. You also need to heat the glass panel too.
Tut: Nintendo 3DS Upper LCD Replacement
If you opened it up all the way to the upper LCD, please double-check step 28, step 29, step 32 and step 35, those steps are regarding the 3D slider.
You don’t need to remove the speaker assembly or the LCD it self.