Broken wire/dodgy connector, put the ignition on with the bars straight & gently wiggle the wires to try & locate, I expect the lights also go out when turning to the right.
When you turn the bars to the left to lock did you push the key down & at the same time turn key to P.
When you turn the bars to the left to lock did you push the key down & at the same time turn key to P.