If you save the current way the screen is divided as a "Save States", you can restore it by loading it even after you change the layout.
Starting scene demonstrated on Suzanne
Steps
Open the "Smart Workspace" tab in the 3D Viewport Sidebar (N key).
Open the "Workspace Manager" section header and click "Save Current Workspace Settings".
A row is added to the "Save States" list.
Change the layout and work (in this example, the 3D Viewport was split into left and right, and the editors in the upper right and lower right were changed).
Select the saved row in the list, click "Load Into Current Workspace", and click OK in the confirmation window.
Follow the changes on screen
BeforeBefore saving. The list is empty.SaveAfter clicking "Save Current Workspace Settings". A row has been added to the list.Change the LayoutThe changed layout. The 3D Viewport is split in two, and the right side has the Text Editor and the Image Editor.LoadAfter "Load Into Current Workspace". The divisions and editor types have returned. The direction of the 3D Viewport is not restored.