There is nothing that I have seen or could find that would imply that you don't get your weapon's magical bonus to causing non-lethal attacks.
Switching lethality already has a penalty that is called out explicitly in the form of a -4 to attack rolls. If there were other costs or penalties with other core effects (such as magic items) it would stand to reason it would be listed in the section marked for just that:
Nonlethal Damage with a Weapon that Deals Lethal Damage
You can use a melee weapon that deals lethal damage to deal nonlethal damage instead, but you take a -4 penalty on your attack roll.
Lethal Damage with a Weapon that Deals Nonlethal Damage
You can use a weapon that deals nonlethal damage, including an unarmed strike, to deal lethal damage instead, but you take a -4 penalty on your attack roll.
From a logical standpoint if a weapon is easier to use or works better for magical reasons, using it in a way that's slightly more difficult should still have it perform better than an otherwise identical mundane weapon wielded similarly.