I need to change something manually on programatically created lights, what's wrong?

I can create lights without problem inside editor using a custom plugin.

Ie a * ADirectionalLight* * but after being created and all the wanted params set I still need to move it or change any param to make it work properly on the viewport

I tested something like

But I had no luck, any thought on this?

Thank you in advance.

Note: if I set it to Stationary it seems to work ok, the problem is only with Static