If your switch is under warranty - ignore everything I'm about to post and contact Lionel for a warranty RMA - there's likely something mechanical or electrical wrong with the switch, get them to fix their crap since these switches almost always seem to have problems of some sort in a batch.
If you flip the switch over - there's a bunch of tiny Phillips head screws, when you unscrew them, that metal plate pops off the bottom, which reveals a mess of cables connected to a big board and a little board. CAREFUL - the metal plate is very sharp on the edges and you can accidentally cut yourself. Make sure not to bend it. Disconnect your switch controller so you don't have a dangling cable to deal with (tiny flathead unscrews the 4 switch controller wires)
After you've popped open the switch, near where the led is for the switch lamp, the DC motor, switch mechanism, and 2 limit switches will be visible. You'll want to make sure the switch mechanism can contact both limit switches correctly ( turning it by hand is the easiest method), and that the DC motor shaft gear teeth are contacting the switch mechanism. (It either spins freely or binds up really badly)
On the opposite side of the board sits the 2 PCBs for the switch. One big PCB will have an array of wires connected to it, a smaller PCB sits near the edge of the switch with a few wires connected to it. Make sure these are all plugged in snug. Trace all wires from point to point - look for any that look frayed or melted - that would indicate a big problem.
Some additional troubleshooting:
When your switch sparks, can you pinpoint the exact part of the switch track that it sparks on? And what direction (or directions) does it spark on?
And the anti drail feature I mentioned - if your switch isn't in the direction of travel of an oncoming loco, it will trigger the switch to flip to that direction without any input from you.
If you do open the switch up - can you take a high res photo/video of the inside?
And also - welcome to hobby! You'll quickly learn a lot of troubleshooting steps as you go on