problem with parent actuator in BGE
you are not unparenting the camera after rotation correctly , you have to set the mode to 2 and activate the actuator to take effect :

if not wh_pressed.positive:
    par_to_player.mode = 2
    cont.activate(par_to_player)


also you may need to kill the rotation after unparenting ( the camera gets thrown away after rotation )