Hi, I'm Diane and will be happy to help you today.
Which version and build of Outlook are you using? See File, Office Account for the information.
In File > Options > General - do you have the option to change the setting?
I've seen a few other reports that Outlook 2019 is bringing up that dialog but does not have the option to change the setting. I emailed my contacts at Microsoft about it and am waiting to hear back.
I suggested to the other users to try this key - only one responded back and said it did not help. If you try it, restart Outlook after adding the key.
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Preferences
DWORD: ReopenWindowsOption
Value: 1
-- Diane
Give back to the community. Help the next person with this problem by indicating whether this answer solved your problem. Click Yes or No at the bottom.

I started getting the "Outlook closed while you had items open..." message starting on July 12, 2023. I am using Outlook 2019. Under Outlook Options -> General -> Start up options,, there are no options to select.
Yesterday, July 14, 2023, I added the Reg Key (below) and it seemed to work for the remainder of the day. However, today when I woke up, I opened Outlook and got the "Outlook closed while you had items open..." AGAIN. I checked the registry and nothing has changed. I have no idea what's going on.
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Preferences
DWORD: ReopenWindowsOption
Value: 1
This is how I resolved it. I reverted back to the prior Build
For anyone who has the same issue.
This is how to revert back to Build 2305:
First, you need to disable Office updates. If you don’t disable updates, the problem update will reinstall itself. You can disable updates from the File menu in any Office application.
In Outlook go to File, Office Account, Update Options and click onDisable Updates.
Open the command prompt as administrator. If you are using Outlook 2016, 2019, or 365, copy the following line, then right click in the command prompt window to paste it. "C:\Program Files\Common Files\microsoft shared\ClickToRun\officec2rclient.exe" /update user updatetoversion=16.0.16501.20210
INCLUDE THE "QUOTES" AS SHOWN ABOVE. If you look at the screenshot below you'll see the first time I entered the command I forgot the beginning quote and it was not recognized. I then put in the quote, pressed Enter and the "update", or in this case "reversion", downloaded and installed.

To revert back to any other build, you can find the build numbers here:
Version numbers of update branches for Office 365 clients.
The format to revert back to a prior build is:
"C:\Program Files\Common Files\microsoft shared\ClickToRun\officec2rclient.exe" /update user updatetoversion=16.0.xxxxx.yyyyy (where you change xxxxx.yyyyy to the build you want)
I just did it and it works without any issues. I hope this helps others.