he also enjoined on his children to follow the same way. jacob also did the same and his last will to his sons was o my children allah has chosen the same way of life for you. hence remain muslims up to your last breath.
ووصى بها إبراهيم بنيه ويعقوب يا بني إن الله اصطفى لكم الدين فلا تموتن إلا وأنتم مسلمون