same issue here.
Post
Replies
Boosts
Views
Activity
same issue here in the VisionOS simulator.
I had encountered the same problem.
After some time researched and I found out the reason.
Apple had changed the private function [_UIRemoteKeyboards peekApplicationEvent:] 's implementation of UIKit in iOS14.2.
the touch event of custom window will call [_UIRemoteKeyboards peekApplicationEvent:] function.
in previous version [_UIRemoteKeyboards peekApplicationEvent:] did't call [UIWindow _makeKeyWindowIgnoringOldKeyWindow:] to change the keyWindow.
but in iOS 14.2 [_UIRemoteKeyboards peekApplicationEvent:] did.
so it's the reason why the keyWindow change when you touch the custom Window.