Apple is unable to fix macOS in regard to keeping the windows in the monitors they were when the computer restarts, comes from hibernation or, in the case, the second monitor is turned off when this happens.
macOS is even unable to keep the resolution of such monitors.
For the monitor resolution, I found a solution, but not for the windows.
I have an M1 iMac and a UHD TV serving as a second monitor. I have plenty of windows opened on both monitors. Not only that, but I shut down. When the computer starts, all windows are on the iMac monitor.
Is there a way to save their positions and restore them to the original place?