Hi Paul,
that'll larn ya to not hack stuff off yer bike prematurely. And what if you want to pick up a bird, eh?
What I'd try is to make a fancy P-clip that clamps around the swingarm and bolt t'other end of the stoplight switch to it.
There is likely enough movement available in the switch that it will still work despite the differential movement between the swingarm and the pedal arm.