Replace onAttachedToWindow and manual subscription tracking with a SubscribeWhileAttached