How do I keep a Docker stack running on Windows after I logout?

Docker Desktop for Windows is meant for development, not for a production web server. If you must use Windows for production you may want to look at ‘Mirantis Container Runtime’ (so, not offered by Docker). But for what Mirantis told me in December 2020, that does not run Linux containers.

If you insist on using Desktop, then in a previous job I have used Task Scheduler on Windows Server 2019 Data Center Edition to start it, and keep it running. Not at all recommended, obviously.