This is absolutely a philosophical question.
Nick Bostrom identifies the 3 malignant failure modes for Artificial General Intelligence:
perverse instantiation; infrastructure profusion; and mind crime.
The first two are physical, the third is virtual, which is essentially what you are talking about.
In principle, anything can be simulated by even very simple systems given enough time. The limit is quantum systems cannot be simulated by classical systems, so if there are intrinsically quantum features required for consciousness that's an issue.
What is the threshold for consciousness? Integrated Information Theory is one approach to trying to picture one, and it's likely to be a spectrum.
We provide almost no protections for some beings, like cock roaches. In animal experimentation a lot more protections are granted to mammals like mice, which though they can be killed as pests, can't be allowed to face suffering considered unnecessary, eg fed live to a pet snake. Animals we consider ourselves to ve able to form deeper emotional interactions with like cats and dogs, we protect above and beyond a criteria related to their cognitive abilities - many pet owners consider them equal in value to themselves or other humans (although probably a large majority don't). Chimpanzees and dolphins are being granted extended rights, eg through the work of The Nonhuman Rights Project supported by philosopher Peter Singer.
So, being simulated, or synthetic, is definitely not a bar to moral concern. However, exactly what kind of complexity or subjective experience is involved for a being, is key to how we treat that.
A fully simulated human, we would have a clear framework for. A synthetic mind might both not feel psychological suffering when a human mind would, and might suffer in ways that are invisible or unintelligible to us. As the complexity of what we can make/simulate increases this will be an open question. The transition between non-conscious and conscious matter is one of the areas of greatest interest and contention in all of philosophy.