Normally LibreCAD does save the UI layout upon exit, widgets and all. But, having said that I have had problems with it too. Try this: setup your preferred layout and then switching the dock area(s) 'off' and 'on' (Widgets -> Dock Areas -> Left|Right|... x2) before closing LC. Next time you launch the application hopefully it will have retained your preferred layout.
If that doesn't work another option is to start with a clean slate. Clear the settings (Options -> Application Preferences -> Defaults tab -> Clear Settings -> Layout or All), close and relaunch LC with the defaults.
Thanks Gary but that's only half the solution:
If I do something stupid, I can't get my previous configuration back.
Going back to the default configuration is a backup solution, ok, it's better than nothing.
Actually, I would like to know which configuration file is concerned to make a backup.
Something weird happened to me. When I changed my layout I ended up with a window bigger than my screen. I couldn't see what was below. Then with the alt key I could move my window and see the bottom. When I turned off the right widget, everything went back to normal!
"do something stupid" - Hey, that's my forte. If I can't break it at some point - I'm not trying hard enough. But, seriously...
On Linux, the configuration is maintained in "/home/<userID>/.config/LibreCAD/LibreCAD.conf". I create a backup of the entire directory,"/home/<userID>/.config/LibreCAD", so I can switch between two different layouts. I have a directory for a desktop with a 1280x960 resolution (LibreCAD.1280x960) and one for my preferred config (originally called "LibreCAD.myConfig"). Switching back and forth can be done by deleting the config directory and copying/renaming one of the back-up directories.
On Windows, the configuration is in the registry; "Computer\HKEY_CURRENT_USER\SOFTWARE\LibreCAD" and/or another similar key associated with the user ID (SSID). It is possible to create a backup of the key(s) using "regedit", but I haven't tried it.