One thing I learnt recently is that Windows 10 or below is incapable of remembering window positions. You need to buy third-party software. Microsoft finally fixed this with Windows 11.
I'm not making this up, its well documented on many internet forums, including Microsoft's own.
Incidentally, made me happy to be a Mac user. Since Apple never had that problem. Infact OS X is magical in how it deals seamlessly with unplugging/plugging external monitors (and no, I don't use an Apple external monitor).