Lurking Green Dragon's second ability applies only while you're declaring attackers. It is not removed from combat if the creature with flying leaves the battlefield, changes controllers, or loses flying after Lurking Green Dragon is declared as an attacker.