Current code for object modes and workspaces assumes a single window and a single active workspace.
This will not always be the case, it's possible we have two active workspaces at once in different windows, showing the same scene - with different active view layers, therefor different active objects.
So we can't assume for example, when switching to a workspace that the workspace is the only user of that object, that another window wont have that objects already in edit/sculpt/vertex paint mode - for eg.
Switching into/out of workspaces should account for all other windows active workspaces.
Since multi-window support often crashes, or shows a black viewport - this isn't very easy to test at the moment.
Keeping this task as reminder to support it eventually.