I can explain you the exact scenario.
You'll have two windows
Initialize and add the secondWindow at run time and dock it to the mainWindow as tabbed document.
Now dock out both windows from the RadDock (make them floating windows)
Now save the layout using SavetoXml() and close the application.
Now run the application again and load the previously saved layout using LoadFromXml()
And dock these floating windows back in the RadDock, now there you'll see that the secondWindow has now been converted to ToolWindow instead of being a DockWindow.