Fix handling of `WindowResolution` change (#24746)