You may also need to check what 'unclean.leader.election.enable' is set to. For example if you have 3 replicas in ISR and you kill the leader, new leader will be elected from only those replicas which are in sync if unclean.leader.election.enable is set to false.
If unclean.leader.election.enable is set to true, then replicas not in ISR can also be elected as leader as a last resort for high availability which may result into data loss.
By default this property is set to true. So if you do not want data loss, it is recommended to set unclean.leader.election.enable=false.