The translation seem to be inaccurate
https://quran.com/al-baqarah/54
Some have interpreted it as kill them and some to kill themselves, why?
is it not that they are asked to repent ?
and Allah s.w.t accepts their repentance
The Quran commanding people to kill themselves or the believers to kill non-believers seems not right