Nick Bostrom introduces the idea of 'mind crime' in his book Superintelligence, in the context of a 'mal8gnant failure mode' of AI instantiation.
As we begin to approach an era of sentient programs, if artificial general intelligences, a logical model ti follow is Peter Singer's idea of The Expanding Circle from the book of that name. He argues that we have to shift from an essentialist position that there is something unique about humans, to an evidence based stance. And, that moral progress consists in expanding the circle of our concern with the welfare of other beings as a result. Opposition to this is increasingly dismissed by AI thinkers as 'meat chauvinism'.
So I would go further than saying it's about whether a simulation is indistinguishable from 'reality', to saying any being with apparent sentience is worthy of moral concern.
We discussed the simulation hypothesis here Are we living in a simulation? The evidence