Maximize window after cmd+tab switching to app with only one window minimized?

One thing is very annoying on macOS: Imagine you have an App openen, line Notes - with only one window. You minimize this window so it's as an icon in the dock, not showing on the screen (coz for example you need more space on desktop). Then you switch to another app. Then you want to switch back to Notes, but... The logic should be that it will restore it's only one window to the original position, so you can work with the app.

But it will not happen. You are back in Notes, but the only one windows is still minimized in the Dock, so you actually switched to the app but you cannot work - you have to unminimize window from the Dock or open a new one.

Any clue how to make only-window unminimize automatically? Any tool, system settings, script, bash script, anything?


Hide the app instead of minimizing it

Instead of minimizing the app, try to hide the app instead by using CMD+H. Functionally it appears to be the same for your use case, and when you switch back to the app either by clicking on it on the Dock or by selecting it in the App Switcher, all windows for that app will reappear in the positions they were when you hid the app.