I solved it:
The only difference was that I had on good version MyWindow.Show();
after initialization. I tried several times commenting and uncommenting this line and this is was the fix.
MyWindow is just name of the windows defined in xaml, and show() does not do anything since window is visible anyway.
If anyone else has this problem just add WindowName.Show()
after InitializeComponent();
I pronounce it a bug unless one of you can think of the reason.