Hello, AeroSpace author speaking :)
I'd be happy if you could try AeroSpace (it's and i3-like window manager for macOS) and report me back if it loses track of windows.
https://github.com/nikitabobko/AeroSpace
The architecture of AeroSpace is that on every user input that may change window configuration (new window created, window moved, window resized, new app launched, etc), AeroSpace runs the same idempotent operation (I call it "refresh session") that tries to detect new window, checks all invariants, re-layouts windows, etc.
The "refresh session" performs all the mentioned steps regardless of the user input nature (it doesn't matter whether the window is moved, or a new app is launched)
I believe that this architecture may lose windows only if the macOS API returns invalid data.
I have been using AeroSpace for quite a while myself and I'm happy with it