Let me clarify it again. The "prisoners" that were attacking the city were under the Wagner group. They were only there to take the city to enhance their 'brand' to show off against RU DOD, then they would leave. And it exactly happened.
If RU's military deployed their prisoners somewhere, killing them is good because they are under RU's military, which means they wasted their manpower.
Wagner may not have faced UKR anywhere else after that city. So killing them did not help UKR much. Instead, it helps the RU regular army in the sense that they did not have to lose many to take the city while giving them enough time to dig in more on the south. All that happened while UKR was losing some of its best troops and equipment for that city.
Wagner may have helped the RU military if the RU military got beaten badly and the UKR was becoming a threat to the RU homeland even when the baldie was still alive. But we know that would not happen for now. Even when RU Military was having a difficult time in the summer last year, did we see Wagner show up to help them?
No, because Wagner at that time, or even right now, is a different entity. UKR's main focus is to inflict as much as damage to the RU military because that is what they are facing before, now and in the future.