This is what I’d expect to happen.
When you Quit krita, whatever docker arrangements you have are stored in the main ‘kritarc’ configuration file. That way, you can do fine tuning of layout and have it remembered for the next session.
The saved workspaces are stored in the resources folder at -/krita/workspaces and can be selected at any time to go back to one of your pre-saved known workspaces.
I can’t think of any reason for the docker arrangement to change between sessions.
I haven’t tried this when associated with resizing the main window which could involve ‘crunching’ some dockers and messing up layout calculations.
The only other reason I can think of for a change in layout between sessions is corruption in the ‘kritarc’ file but if that has happened then it would be a very specific type of file corruption which I think would be unlikely.
If there was that type of file corruption then you’d notice all sorts of other problems as well.
I don’t think that verison 5 has done anything in particular with workspaces and docker layouts and I can’t remember seeing any bug reports in that area.
You can try the latest 5.0.0-prealpha nightly, as a portable .zip package, but make sure to make a backup copy of all your configuration files and the resources folder for later restoration in case anything ‘strange’ happens.