Lionel 42" switch acting goofey

I bought 2 of these #5168 right hand 027 profile 42" switches at a swap meet. My single motor Lionel 8158 GP9 was passing through the switch through the straight part and as soon as the motor truck passes it changes the switch and the engine stops from loss of power. Power was hooked up from the other side of the switch as I’m working on the layout and I don’t have it wired up yet. Just one lockon hooked up down the track down from curved part of switch.

I think you answered your own question by the location of your lock-on. It should be in front of the switch, not behind it in my opinion. Ken

If these are non-derailing switches,check to see if the insulating pins are in the correct rails.