According to Article 5 of NATO’s collective defense treaty, the other members are required to defend their allies if one of them is attacked. This indicates that Article 5 would be activated if Ukraine joined NATO while still at war with Russia.