When pressing the "Power Off" button in Ubuntu 20, is there a way to prevent the system from shutting down when any programs (especially in other workspaces) are still open? Or to at least provide a warning that let's one abort the shutdown process? I frequently experience unwanted forced program terminations and would like to prevent this in the future. I would prefer not to run a shell script when shutting down the computer. Just pressing the regular "Power Off" button should be sufficient.
The question was asked before here for Ubuntu 18. The answer does not seem to address my issues properly because I would like to have a simple solution that just works on pressing the "Power Off" button (as opposed to running any scripts). This answer on Stackoverflow proposes running a script all the time in the background that handles any shutdown. I'm also not a big fan of this one as I believe there may be a more "native" and simpler feature in Ubuntu.
Background to the use case as per @vanadium's request in the comments
The use case would be less about lost data and more about "lost setup". In the first workspace, I often have one or two development environments, a browser with certain tabs, and some other programs running; then the same thing in another workspace along with Slack; and then another workspace with mostly spreadsheets and yet more browser tabs. It takes a long time to set all of this up again and the problem lies in losing my state of work for different projects. I usually save everything immediately, so this warning is unfortunately not helpful in this case.