I also have wanted this for a long time, is there a limitation on macOS that prevents this? It doesn’t sound that hard but maybe if apis aren’t there it is.
First, make sure that: System Preferences > General > Desktop & Dock > Windows > Close windows when quitting an application = OFF
Then leave the windows of an app open as you quit it. When you next launch the app its windows will restore to their previous size and position. If you close the windows first, then the app will restore to having no windows open.