A switch simply uses water pressure to turn on the pump and then turn off the pump.
Now you're pump was running AND you had no water... so the switch couldn't turn off the pump if it wanted to, It is a PRESSURE switch, with no water, it doesn't run on air pressure.
Now what are the possible causes of no water? Here's a big hint; I shut the system off and the pump kept kicking back on every so often to run for a few minutes.
That says the switch was working just fine no? It also says that water was going somewhere. If you weren't using it, where could it go? That means a leak, right?
When you shut off the pump, that leak caused the pump to lose prime and when you turned it on, the pump ran dry, which probably caused the impeller to melt but... without priming the pump, it can't pump water even if it was a new pump. And you changed the switch.
So, moral of the story, when something doesn't operate as usual, like a pump running when no water is used, there is a problem. Problems are just like women, if they aren't paid any attention, the PROBLEM... it don't fix itself and you end up with many more problems.... No, don't ask how I know, just think and trust me, I'm much older than you.